Closed covrig closed 7 years ago
Hi covrig!
your first problem is the same like issue #5. I had the same problem with influxdb and just added the climate-devices to the blacklist. I use the sensor.
The second doesn't occur in my hass environment. Is there an exception documented right before the message? I just catch one type of exception (ValueError
). It should occure, when the component was not able to convert the *_temperature.state
to a number (states in hass seem to be always strings).
For #8 and #5 I will get to the homeassistant gitter this afternoon and ask how the state of climate devices should behave. I didn't find any information on that.
@wmalgadey Thanks for the answer. I just did this and created a template sensor to read the target temperature from the climate component. I want to have a nice chart in Grafana with target temperature, current temperature and when the heater starts. Any idea if your component will crash the thermostat or the hub? I can't find any info about the refresh/update rate.
I will leave it here maybe others are interested:
- platform: template
sensors:
replacethis_target:
value_template: '{{ states.climate.replacesthis.attributes.temperature }}'
friendly_name: 'Whatever'
unit_of_measurement: '°C'
the target temperatur is also an attribute from sensor.<zone_name>_temperature
(it is called setting). I think, templating the sensor is better, because the climate just 'listens' to the state changes from the different sensors. You may be will get a delay between sensor
->climate
->template
SELECT mean("value") FROM "°C" WHERE "entity_id" = 'wohnzimmer_temperature' AND $timeFilter GROUP BY time($interval) fill(previous)
this is the select in grafana to query the temperature from the sensor (saved in influxdb) and
SELECT mean("setting") FROM "°C" WHERE "entity_id" = 'wohnzimmer_temperature' AND $timeFilter GROUP BY time($interval) fill(previous)
to select the setting-temperature (->mean("setting")
instead of mean("value")
)
@wmalgadey Thanks for the clarification and the Grafana hints. I appreciate it.
does that solve your first problem for the moment? I have no luck getting some information on gitter!
I don't want to "break the hass" philosophie just by changing the state to the temperature.
And for your second problem? Is there any more detail on the error in the log?
Both errors are fixed. Sorry for not mentioning it clearly. I blacklisted the climate components from being recorded to influxdb. The climate component should not have an unit assigned, since it has multiple types of attributes in it. The way it is now, the only way it can be written to influx is as a string and that creates the error since other temperature sensors write floats.
The second error was because of a change I did in your code to fix the first one. Sorry.
np! i am working on the unit/string problem :)
x
Again, great job. My question is, how often do you update the sensors (call the API)? I hope the thermostat will not fail. I have a small problem with this component and the influxdb platform. The error is that this platform generates the temperature as a string while the rest generate it as a float. Influx can't save them together and this results in a log FULL of errors.
Another error would be: