Got it now,
Was trying to get it up as an entity sensor.
Im trying to run it as a binary sensor (on/off)
So i can set an automaton up with it.
Right now, i can set up a numerical state depending on the battery charge / discharge value, but as im trying to run the automaton to change a wled segment colour, wled keeps crashing.
So im attempting to set this as a simple on/off binary.
Similar to a door sensor that ive already got set up.
Only issue i have now is, i cant run this as a device to set the automaton.
This seams to have worked a treat, Thank you so much for your help.
Just one more question if thats ok?
How would I go about setting a binary sensor up to report HI/MID/LOW depending on a value state? (if its at all possible.)
- sensor:
-name: Grid Power <500 (GREEN)
state: >
{% if states("sensor.solarsynk_grid_power")|float <500 %}
on
{% else %}
off
{% endif %}
##########################################
- sensor:
-name: Grid Power >500 <1000 (AMBER)
state: >
{% if states("sensor.solarsynk_grid_power")|float >500 <1000 %}
on
{% else %}
off
{% endif %}
#########################################
- sensor:
-name: Grid Power >1000 (RED)
state: >
{% if states("sensor.solarsynk_grid_power")|float >1000 %}
on
{% else %}
off
{% endif %}
So this is what Im working on tonight.
Im aiming to work my automations off what sensor returns “ON”.
A Red, Amber or green LED in WLED off an ESP32 to show what grid power usage is occurring at any given time,
(below 500W = Green LED)
between 500 and 1000W returns Amber LED)
Over 1000W to return RED LED)
Right now, the <500 sensor and >1000 Sensor are returning the desired results, but the middle one (>500 <1000) is returning the same end state as the >500 sensor.
What would be your suggestion to return “ON” only on one of the 3 sensors pending on the range value?
Hi,
I did try setting up a numerical state automation to look for a value between Hi and low fixed value, but as im trying to set an LED to return a colour (Green / Amber / Red) between 3 targeted values, the system was getting too confused.
So Im trying to set this sensor up to return ON/OFF instead to run the automation off that.
Well if you’re using ESP Home, you also don’t need to create additional sensors to do this.
I’m not good at ESP Home, but I’m quite sure, if you’re using ESP Home to control your wled on the esp device, you can use lambda to do the exact same thing without having to create any sensors. The esp device is able to subscribe and listen to changes on the states.
I am convinced that trying to parse the value to HI/MID/LO or into on off states is unnecessary.