Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSDCGQ11LM values are getting lost with cache_state: true #485

Closed
Koenkk opened this issue Oct 15, 2018 · 6 comments
Closed

WSDCGQ11LM values are getting lost with cache_state: true #485

Koenkk opened this issue Oct 15, 2018 · 6 comments
Labels
problem Something isn't working

Comments

@Koenkk
Copy link
Owner

Koenkk commented Oct 15, 2018

Zigbee2mqtt 0.1.7

Log: https://hastebin.com/uvipiliray.js

This sensor supports humidy, temperature and pressure but only 2 values are reported at the same time. It seems that the cache_state mechanism doesn't work correctly.

This causes errors in home assistant graphs. (https://imgur.com/a/uu8JE11)

@Koenkk Koenkk added the problem Something isn't working label Oct 15, 2018
@mrfoxbit
Copy link

I have same issue

Oct 16 14:05:08 hassbian npm[28096]:   zigbee2mqtt:info 2018-10-16 14:05:08 MQTT publish, topic: 'zigbee2mqtt/livingroom_sensor_weather', payload: '{"temperature":32.48,"linkquality":123,"humidity":73.68}'
Oct 16 14:05:08 hassbian npm[28096]:   zigbee2mqtt:info 2018-10-16 14:05:08 MQTT publish, topic: 'zigbee2mqtt/livingroom_sensor_weather', payload: '{"humidity":73.68,"linkquality":123,"pressure":1006}'
Oct 16 14:07:19 hassbian npm[28096]:   zigbee2mqtt:info 2018-10-16 14:07:19 MQTT publish, topic: 'zigbee2mqtt/bedroom_sensor_weather', payload: '{"temperature":30.87,"linkquality":170}'
Oct 16 14:07:19 hassbian npm[28096]:   zigbee2mqtt:info 2018-10-16 14:07:19 MQTT publish, topic: 'zigbee2mqtt/bedroom_sensor_weather', payload: '{"temperature":30.87,"linkquality":168,"humidity":78.57}'
Oct 16 14:07:19 hassbian npm[28096]:   zigbee2mqtt:info 2018-10-16 14:07:19 MQTT publish, topic: 'zigbee2mqtt/bedroom_sensor_weather', payload: '{"humidity":78.57,"linkquality":168,"pressure":1005}'

2018-10-16 14:05:08 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: 'dict object' has no attribute 'humidity' (value: {"temperature":32.48,"linkquality":123}, template: {{ value_json.humidity  | round }})
2018-10-16 14:05:08 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: 'dict object' has no attribute 'temperature' (value: {"humidity":73.68,"linkquality":123,"pressure":1006}, template: {{ value_json.temperature  | round(1) }})
2018-10-16 14:07:19 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: 'dict object' has no attribute 'humidity' (value: {"temperature":30.87,"linkquality":170}, template: {{ value_json.humidity  | round }})
2018-10-16 14:07:19 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: 'dict object' has no attribute 'temperature' (value: {"humidity":78.57,"linkquality":168,"pressure":1005}, template: {{ value_json.temperature  | round(1) }})

@Ton1965
Copy link

Ton1965 commented Oct 16, 2018

Having the same problem. Probably I am wrong (never used JS before) but it looks like commit 03d913d was missing one additional change. Currently it is necessary to change line 563 of controller.js to 'this.state.set(deviceID, messagePayload)'. As it is now cache state is set to the contents of the last zigbee message thus loosing the current cache contents.

Koenkk added a commit that referenced this issue Oct 16, 2018
@Koenkk
Copy link
Owner Author

Koenkk commented Oct 16, 2018

@Ton1965 nice catch, this indeed fixes this issue, thanks!

@Koenkk Koenkk closed this as completed Oct 16, 2018
@mrfoxbit
Copy link

Thanks @Ton1965

@mario-g0
Copy link

so, for the hassio add-on I should write to its developer?

@ryanbeaton
Copy link

No just use the edge version of the add on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants