Hello all,
I’m assuming this is going to use 2 integrations, HACs custom-button and Sonoff LAN.
I currently get the Power (W), Voltage (V), and Current (A) from devices plugged into my sonoff plug. What I would like to do is when the device is on for the button to change a different color in my dashboard so I know its on.
I’m open to anyway to make this work.
My sonoff plug says its a sensor and switch.
Here is the config to show a graph or the power for my plug.
hours_to_show: 60
graph: line
type: sensor
detail: 1
entity: sensor.sonoff_100153b528_power
I’m not sure if I should make a template or just make a custom button that when it detects the amps/power above 0 the color changes.
I know I could use something like this just im not sure about getting the amps and having it above 0 in the button.
- type: custom:button-card
entity: binary_sensor.frontyard_person_motion
icon: mdi:motion-sensor
name: Heater
color_type: card
styles:
card:
- filter: opacity(70%)
height: 160px
name:
- font-size: 15px
- color: white
state:
- value: 'on'
styles:
card:
- background-color: yellow
- filter: opacity(100%)
icon:
- color: black
name:
- font-size: 15px
- color: black
When I go to an entity in but custom:button my sensor does not appear. I’m assuming that is what I need to get the amperage.