home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.47k stars 29.41k forks source link

Cannot set state attributes of a device #3312

Closed philhawthorne closed 7 years ago

philhawthorne commented 7 years ago

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version): 0.28

Component/platform: Synology -> Docker Image

Description of problem: When using the states UI in Home Assistant (/dev-states), changing the value of an entity removes any "state attributes".

For example, a multisensor has the value of "on", I change that to "off", and things such as battery level, node_id and friendly name are lost. This means my "Ensuite Motion Sensor" is now "aeotec multi sensor sensor 33".

When the Z-wave network updates the status, the friendly names and attributes are returned.

Expected: When setting the state of an entity, for example a multisensor from on to off via the dev tools, the attributes such as friendly_name etc should be maintained (as they were in previous versions)

Problem-relevant configuration.yaml entries and steps to reproduce: Happens with various entities, not just z-wave. For example, you may change the weather temp from Forecast.io and it will remove the nice name.

- platform: forecast
    api_key: 
    monitored_conditions:
    - summary
    - precip_probability
    - temperature
    - hourly_summary
    - temperature_max
Landrash commented 7 years ago

That would be expected behavior? If you write a state to an entity without a friendly_name it won't have a friendly_name anymore.

philhawthorne commented 7 years ago

No, sorry the issue is, even if you do set a friendly_name, it doesn't keep it. It's like the entire state_attributes are ignored.

grahamwetzler commented 7 years ago

I'm having the same issue. When I restart HA I manually set myself from "not_home" to "home". This used to work fine. However, now when I do it the state attributes are removed.

I select my state:

screen shot 2016-09-15 at 4 25 51 pm screen shot 2016-09-15 at 4 31 02 pm

Manually change the state from "not_home" to "home":

screen shot 2016-09-15 at 4 26 06 pm

The state attributes are removed.

screen shot 2016-09-15 at 4 26 23 pm screen shot 2016-09-15 at 4 30 00 pm
balloob commented 7 years ago

Can confirm this too. Working on a fix.

balloob commented 7 years ago

Will be fixed in 0.29