frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Automation editor displays unit from the main entity in from/to-field for attributes

Open Skeletorjus opened this issue 2 years ago • 7 comments

Checklist

  • [X] I have updated to the latest available Home Assistant version.
  • [X] I have cleared the cache of my browser.
  • [X] I have tried a different browser to see if it is related to my browser.

Describe the issue you are experiencing

When selecting an attribute in the state trigger in the automation editor, it shows the entity's unit even though it doesn't make any sense to do so. See attached image for an example where the only possible values are true/false.

image

Describe the behavior you expected

I expect it to not display any units.

Steps to reproduce the issue

  1. Create an automation with a state trigger
  2. Select an attribute
  3. Fill in the from/to-fields
  4. Observe the unit

...

What version of Home Assistant Core has the issue?

core-2022.9.0b1

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Google Chrome 104.0.5112.102

Which operating system are you using to run this browser?

Windows 10

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

Skeletorjus avatar Sep 02 '22 11:09 Skeletorjus

Can you post the state YAML of the entity you are selecting. I am wondering what kind of special thing you got there, because I am not able to reproduce that issue with the entities I randomly tried on my end 😄

spacegaier avatar Sep 05 '22 22:09 spacegaier

Sure thing :)

It's from the Nordpool custom component.

current_price: 5.93
average: 5.105
off_peak_1: 4.416
off_peak_2: 6.155
peak: 4.544
min: 3.266
max: 6.867
unit: kWh
currency: NOK
country: Norway
region: Kr.sand
low price: false
tomorrow_valid: false
today:
  - 3.493
  - 3.818
  - 3.528
  - 3.62
  - 3.67
  - 4.913
  - 5.775
  - 6.512
  - 6.751
  - 5.93
  - 5.517
  - 3.897
  - 3.266
  - 3.418
  - 3.583
  - 4.836
  - 5.902
  - 6.021
  - 6.572
  - 6.867
  - 6.762
  - 6.369
  - 5.827
  - 5.663
tomorrow: []
raw_today:
  - start: '2022-09-06T00:00:00+02:00'
    end: '2022-09-06T01:00:00+02:00'
    value: 3.493
  - start: '2022-09-06T01:00:00+02:00'
    end: '2022-09-06T02:00:00+02:00'
    value: 3.818
  - start: '2022-09-06T02:00:00+02:00'
    end: '2022-09-06T03:00:00+02:00'
    value: 3.528
  - start: '2022-09-06T03:00:00+02:00'
    end: '2022-09-06T04:00:00+02:00'
    value: 3.62
  - start: '2022-09-06T04:00:00+02:00'
    end: '2022-09-06T05:00:00+02:00'
    value: 3.67
  - start: '2022-09-06T05:00:00+02:00'
    end: '2022-09-06T06:00:00+02:00'
    value: 4.913
  - start: '2022-09-06T06:00:00+02:00'
    end: '2022-09-06T07:00:00+02:00'
    value: 5.775
  - start: '2022-09-06T07:00:00+02:00'
    end: '2022-09-06T08:00:00+02:00'
    value: 6.512
  - start: '2022-09-06T08:00:00+02:00'
    end: '2022-09-06T09:00:00+02:00'
    value: 6.751
  - start: '2022-09-06T09:00:00+02:00'
    end: '2022-09-06T10:00:00+02:00'
    value: 5.93
  - start: '2022-09-06T10:00:00+02:00'
    end: '2022-09-06T11:00:00+02:00'
    value: 5.517
  - start: '2022-09-06T11:00:00+02:00'
    end: '2022-09-06T12:00:00+02:00'
    value: 3.897
  - start: '2022-09-06T12:00:00+02:00'
    end: '2022-09-06T13:00:00+02:00'
    value: 3.266
  - start: '2022-09-06T13:00:00+02:00'
    end: '2022-09-06T14:00:00+02:00'
    value: 3.418
  - start: '2022-09-06T14:00:00+02:00'
    end: '2022-09-06T15:00:00+02:00'
    value: 3.583
  - start: '2022-09-06T15:00:00+02:00'
    end: '2022-09-06T16:00:00+02:00'
    value: 4.836
  - start: '2022-09-06T16:00:00+02:00'
    end: '2022-09-06T17:00:00+02:00'
    value: 5.902
  - start: '2022-09-06T17:00:00+02:00'
    end: '2022-09-06T18:00:00+02:00'
    value: 6.021
  - start: '2022-09-06T18:00:00+02:00'
    end: '2022-09-06T19:00:00+02:00'
    value: 6.572
  - start: '2022-09-06T19:00:00+02:00'
    end: '2022-09-06T20:00:00+02:00'
    value: 6.867
  - start: '2022-09-06T20:00:00+02:00'
    end: '2022-09-06T21:00:00+02:00'
    value: 6.762
  - start: '2022-09-06T21:00:00+02:00'
    end: '2022-09-06T22:00:00+02:00'
    value: 6.369
  - start: '2022-09-06T22:00:00+02:00'
    end: '2022-09-06T23:00:00+02:00'
    value: 5.827
  - start: '2022-09-06T23:00:00+02:00'
    end: '2022-09-07T00:00:00+02:00'
    value: 5.663
raw_tomorrow: []
unit_of_measurement: NOK/kWh
icon: mdi:flash
friendly_name: nordpool_kwh_krsand_nok_3_10_025

Skeletorjus avatar Sep 06 '22 07:09 Skeletorjus

And what domain is that entity from (so the part in the entity ID before the dot)?

spacegaier avatar Sep 06 '22 07:09 spacegaier

Sensor. Full name sensor.nordpool_kwh_krsand_nok_3_10_025.

Skeletorjus avatar Sep 06 '22 07:09 Skeletorjus

Your issue description was a bit misleading / incomplete. The important part to reproduce it, is to actually manually type in a "From" or "To" value, not just selecting an attribute 😉.

Only then will the unit get added / filled into the field, not by just selecting an attribute as your reproduction steps say.

spacegaier avatar Sep 06 '22 19:09 spacegaier

Your issue description was a bit misleading / incomplete. The important part to reproduce it, is to actually manually type in a "From" or "To" value, not just selecting an attribute 😉.

You are absolutely correct, changed the title and steps 😊

Skeletorjus avatar Sep 06 '22 19:09 Skeletorjus

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 05 '22 21:12 github-actions[bot]

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 24 '23 14:07 github-actions[bot]