I have created an automation for my dryer utilizing an InkBird temp sensor. I keep getting false notifications. Looking at the logs, I’m not seeing this notification justified. Is there another conditions I should add to stop this?
Basically if inkbird drops below 100 degrees for 5min, notify my phone.
Without this trace information we are just guessing. But my guess is that your sensor is going unavailable. The when it returns to a number under 100 for 5 minutes the automation triggers.
If this is the case you can prevent the triggers by using a state condition (not from unavailable).
It’s entirely possible your symptoms may be caused by the dryer going offline. Mine does that once the cycle finishes. But there is another possibility:
Consider that your automation is based on a sensor, and triggers are evaluated as sensor values change. So if it drops below 100 it will trigger. This is expected. But… after five minutes the temperature is STILL DROPPING. So the next time the sensor is evaluated in the automation the result is true again and another notification is fired off.
The easy solution is to add a condition that prevents repetitive notifications. If you search for automation last triggered conditions I think you’ll find lots of examples. If not, let me know and I can send you something tonight .
Hope this helps.
This happens randomly not necessarily a double trigger. But I thought something like that could be happening.
So the temp fluctuates when the dryer is off because the sensor is in the dryer vent. Hot air from outside comes in and it increases. I’m guessing when the temp decreases it’s triggering it. Wondering if the trigger should be something like “when temp decreases below 100 degrees but only when it was above 100 degrees”. Not sure how I would do that though?
I can’t seem to figure out where the log is that would show it losing connectivity. I’m pretty new to this. 2 weeks in!
You can add the PING integration https://www.home-assistant.io/integrations/ping/. With that, you can check the online status of wifi devices and set you automations to respond or not respond. Here is the automation I use to ping devices and a second automation to notify me.
- id: a_device_goes_offline
alias: A Device goes Offline
initial_state: TRUE
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.ping_sunroom_led
to: "off"
for:
minutes: 10
- platform: state
entity_id: binary_sensor.ping_led_porch
to: "off"
for:
minutes: 10
- platform: state
entity_id: binary_sensor.ping_tv_left
to: "off"
for:
minutes: 10
condition:
condition: and
conditions:
- condition: template
value_template: >
{% if states.automation.a_device_goes_offline.last_triggered is not none %}
{% if as_timestamp(now(),0) | int - as_timestamp(states.automation.a_device_goes_offline.attributes.last_triggered,0) | int > 3600 %} true {% else %} false
{% endif %}
{% else %}
false
{% endif %}
action:
- action: script.turn_on
entity_id: script.notify_hass_a_device_goes_offline
data:
variables:
var_device_name: "{{ trigger.to_state.attributes.friendly_name }}"
- action: script.turn_on
entity_id: script.notify_push_a_device_goes_offline
data:
variables:
var_device_name: "{{ trigger.to_state.attributes.friendly_name }}"
#
NOTE: I deleted numerous sensors from both lists to minimize code length. Sensors seen in first code may not have remained in second code. This is just to demonstrate how the code works!!!
NOTE 2: This code is pretty old now and there are cleaner, better ways to improve upon it, I just don’t have the time to fix something that isn’t broken (yet).
NOTE 3: Take note of the condition in the second code. This is one way to prevent duplicate triggers of an automation. This is what I was referring to earlier, although not your primary problem in this case. Still it’s a good concept to employ.
You’ll have to install the ping integration and set it up before the code will work. It’s a pretty straightforward process. You just need the IP address of each device you want to add.