Hey everyone, obviously new to this, hoping to seek some help.
I’ll do my best to get the first post right. So let’s start with what I am trying to do.
I have a nest binding (OH2) that has an item ( LivingRoomThermostat_State ) when it’s in my homesite it reads when the HVAC unit is in a “cooling”, “heating”, or “off” mode. No switch or number or anything, pure string value.
What I want to do is be able to graph (I have Grafana and InfluxDB as my persistence ) when and how long the A/C unit is in cooling mode. I can see (LivingRoomThermostat_State) in Grafana as a item. But no data is available.
My assumption(correctly me if i am wrong) is the string(text) should be converted out to a number state.
So here is my sorry excuse for trying to attempt this:
rule "Thermostat living room to number"
when
Item LivingRoomThermostat_State changed
then
if(LivingRoomThermostat_State.state!="cooling")
{
LRthermostate_Number.sendCommand(1)
}
else
{
if(LivingRoomThermostat_State.state!="off")
{
LRthermostate_Number.sendCommand(0)
}
}
end
It…kinda works. no… no it doesn’t really work. No matter what going [‘off’ to ‘cooling’] or [‘cooling’ to ‘off’] it populates item LRthermostate_Number with a value of 1.
Regardless of that, I feel like there is an easier way to get this string into Grafana without rules. I just need a little bit of direction with this. OR a way to simply convert this string into an usable item.
Thanks for any help or direction.
-Chase