@Markus99 The only change I made to Mark’s code above is:
sensor:
- platform: statistics
name: Bill Bathroom Average Linear 24h
entity_id: sensor.bill_br_govee5075_humidity
state_characteristic: average_linear
max_age:
hours: 24
sampling_size: 2880
I did this as I was seeing big spikes in the average when the shower was on.
This eliminated the spikes I was seeing ( graph above). Still not sure why it does not trigger on the 5% threshold on the on condition. The off is working correctly.
I am graphing the delta (Current humidity - Ave) and I am seeing spikes that can’t be true.
I found this is caused by my humidity sensor giving a wrong reading. I am trying figure out what is causing it and hopefully I can then get it to trigger correctly.
I looked at both the humidity and average sensor and neither has any spikes. Not sure how one minus the other could get these spikes?
I just ran the shower and for some reason it doesn’t turn the fan on until 80 % (reading was 48 %). Turned off at 53 which seems correct.
What I did to smooth out the delta sensor was change the hours to 3 and the samples to 360. Before this was was getting triggers with the off of humid days.
If you mean running the automation manually then the error is expected as triggers are bypassed and the action relies on a trigger attribute in this case (which does not exist).
If you are a N00b, then in configuration.yaml with binary_sensor: above it.
Alternatively if you have a binary_sensors.yaml or similar it can go in there.
Once you get the hang of configuration splitting the truth is you can put it in any yaml file that is appropriately included or part of a package.
Thanks! The check config keeps pointing out I need to add a platform:. So I’ve tried: running, sensor, bath_room etc. But it keep saying: Platform error binary_sensor.Fan - Integration ‘Fan’ not found.
I can’t figure out how to move on…
Okay, completely lost you. If it’s supposed to be a template, why does the original author didn’t mention this? Don’t know how to convert from original setup to template.