I have a sensor (sensor.nn_max_hdd_temp) that I know is working as I graph it in Graphana - it contains the maximum temperature of a bunch of HDD’s in a NAS. I actually go straight from the NAS to influxdb and then pull the data into HA via a flux query. This value is set by a helper and is then pushed back to InfluxDB and then out to Grafana
I also have a smart switch connected to a light bulb. I can turn this on and off with HA at the dashboard. This is (switch.tasmota_wifi1). The intention is to use the lightbulb as a placeholder, so that when the max drive temps go > a set value then the light turns on and then back off again when the sensor goes below a value.
The intention is that this is a test precursor to switching on / off an HVAC system based on temperature so I can keep the drives below a set value. At the moment I am treating this as a heater, so I haven’t reversed things yet. I am just trying to get the concept working first
The intention is that if temp < 32 then light off
if temp > 32 then light on and if temp goes as high as 39 then I think light off again.
Temp was 33 earlier today and is now 31 - so the light should be on (I think)
max_temp and min_temp set the available range of set points, they do not actually set the target temperature… that is set initially by the target_temp variable.
Did you turn the climate entity mode to heat…? You did not set an initial_hvac_mode, so the default is off and you must turn it on through the UI or a service call.
With the climate entity on and a setpoint of 36, the light should have turned on whenever the temp changed to a value below 36, and turned off once the the temp reached 36.3 or above (the default tolerance is 0.3).
Check the switch’s history. If there’s no evidence of switching, post the climate entity’s data from the States tool in Developer tools.
And that seems to work. The light was off, I turned on the AC and now the light is on (temp as I check is 34). So I shall wait for the temp to go back up and see if it does as expected.
I do however need a less powerful bulb for testing though [Blink Blink]
And the light turned off again as the temp went up. Now I get to try and reverse the effect
I shall run some more tests on this over the next few days and then switch to the AC unit.
I believe that I am limited to a single switched unit in the generic thermostat - so if I want the light to come on / off AND the AC to switch on / off then I will need a second generic_thermostat triggered from the same value. I am tempted by a light on in my office if the AC is on for the server - its nice to know
As a second thought - does anyone know of a way (device) of having a USB Power Supply with more than 1 USB port - but individually addressable - so I could use one to power a bank of small light and use HA to switch on / off each light individually?
You are limited to one switch entity, but that could be a Template switch that includes both the Tasmota switch and light in it’s actions. Or you can set up a second automation to turn the light on/off based on the Tasmota switch or climate entity’s state… there’s no real advantage (and some disadvantage) to setting up a second Generic thermostat if the temperature set points are going to be the same.
so this needs to be set to “Cool” or “off” - the rest don’t matter
If however I change the yaml to heater: climate.set_hvac_mode then it doesn’t work
As an aside this is not a great solution (not HA’s fault) in that the sensibo unit I am using to talk to the AC unit can only send data - it has no idea of what the actual state of the AC unit is. Other than changing the AC unit for one that is directly supported in some manner (WiFi connection or similar) then I don’t see a way around the issue
Yeah - its working. I have done something a bit different to what I was trying
Rather than try and (it seems like) reinvent the wheel I have used my light on/off switch (that was working correctly) in a simple pair of automations. If light turns on - then switch on AC. If light turns off then switch off AC. The min_cycle_duration inside the generic_thermostat keeps the light from cycling on and off too often and thus keeps the AC from cycling too often as well.