I modified the YAML file and added some features:
- Renamed xxx_1 xxx_2 xxx_3... to xxx_01 xxx_02 xxx_03... (So they are arranged in the list)
- Renamed M30_1_xxx M30_2_xxx M30_3_xxx to M30_L1_xxx M30_L2_xxx M30_L3_xxx (I prefere)
- Renamed m30_x_watt_x to m30_x_Power_x
- Created variable for led_brightness (To set the brightness value for all LEDs at once)
- Created variable for the min current to trigger the LEDs (So all the sensors that have the current value under this threshold are off)
- Created variable for power factor (As i had issues with power (watt) value indicated by the original yaml, I changed the way the power value is calculated to: [current * voltage * power factor])
- Created variable for current correction (To be able to calibrate the measured current)
- created slider for LEDs brightness (so it can be adjusted in HASS user GUI)
- created slider for LEDs trigger current (so it can be adjusted in HASS user GUI)
- created slider for Power factor (so it can be adjusted in HASS user GUI)
- created slider for Current factor (so it can be adjusted in HASS user GUI)
- changed LEDs color scheme:
- current <= led_trigger_current = LED "Off"
- current <= max_current_rangeX * 0.25 led = "Blue"
- current <= max_current_rangeX * 0.5 led = "Violet"
- current <= max_current_rangeX * 0.75 led = "Orange"
- current > max_current_rangeX * 0.75 led = "Red"
If you want to try it, here it is:
https://drive.google.com/file/d/1D6feGfj...sp=sharing
Don't forget to enter you wifi settings or un-comment the ethernet section if you use cable (and comment wifi)
wifi:
ssid: "YOUR_SSID"
password: "YOUR_PASSWORD"
# ethernet:
# type: LAN8720
# mdc_pin: GPIO23
# mdio_pin: GPIO18
# clk_mode: GPIO17_OUT
# phy_addr: 0