Yes, I have exactly whats below…
globals:
- id: first_read
type: boolean
initial_value: 'true'
time:
# time based on Home Assistant time
id: ha_time
platform: homeassistant
timezone: Australia/Sydney
sensor:
- id: water_tank
platform: ultrasonic
trigger_pin: D1
echo_pin: D4
name: Tank Sensor
filters:
lambda: |-
auto now = id(ha_time).now(); // local time
if ((now.hour >= 22 && now.hour < 6) || id(first_read)) return x;
else return id(water_tank).state;
id(first_read) = false;
You can see where I uploaded the new code (around 3pm) it has effected the frequency of readings but still every minute or so…
Actually, after looking at this history data this isnt going to solve my problem anyway…
Back to the drawing board, sorry…