changes
This commit is contained in:
@@ -7,17 +7,22 @@ let
|
||||
{ name = "Living Bulb 4"; id = "485519D94A28"; }
|
||||
{ name = "Living Bulb 5"; id = "485519DA6B6A"; }
|
||||
{ name = "Living Bulb 6"; id = "485519D9E018"; }
|
||||
{ name = "Bedroom Bulb 1"; id = "08F9E06F4EB4"; }
|
||||
{ name = "Bedroom Bulb 2"; id = "485519EE0ED9"; }
|
||||
{ name = "Bedroom Bulb 3"; id = "08F9E06FE779"; }
|
||||
{ name = "Bedroom Bulb 4"; id = "485519EE00A0"; }
|
||||
];
|
||||
|
||||
switches = [
|
||||
{ name = "Kitchen Switch"; id = "483FDA8274C2"; relay = "0"; }
|
||||
{ name = "Livingroom Switch"; id = "483FDA8274C2"; relay = "1"; }
|
||||
];
|
||||
|
||||
proswitches = [
|
||||
{ name = "Hallway Circuit"; id = "c8f09e894448"; relay = "0"; }
|
||||
{ name = "Bathroom Circuit"; id = "c8f09e894448"; relay = "1"; }
|
||||
{ name = "Kitchen Circuit"; id = "c8f09e894448"; relay = "2"; }
|
||||
{ name = "Livingroom Switch"; id = "shellyplus2pm-e86beae5d5d8"; relay = "0"; }
|
||||
{ name = "Kitchen Switch"; id = "shellyplus2pm-e86beae5d5d8"; relay = "1"; }
|
||||
{ name = "Bedroom Switch"; id = "shelly1pmminig3-34b7da933fe0"; relay = "0"; }
|
||||
{ name = "Hallway Circuit"; id = "shellypro3-c8f09e894448"; relay = "0"; }
|
||||
{ name = "Bathroom Circuit"; id = "shellypro3-c8f09e894448"; relay = "1"; }
|
||||
{ name = "Kitchen Circuit"; id = "shellypro3-c8f09e894448"; relay = "2"; }
|
||||
];
|
||||
in {
|
||||
services.home-assistant.extraComponents = [
|
||||
@@ -45,14 +50,14 @@ in {
|
||||
in {
|
||||
name = switch.name;
|
||||
unique_id = unique_id;
|
||||
state_topic = "shellies/shellypro3-${switch.id}/status/switch:${switch.relay}";
|
||||
state_topic = "shellies/${switch.id}/status/switch:${switch.relay}";
|
||||
value_template = "{{ value_json.output }}";
|
||||
state_on = true;
|
||||
state_off = false;
|
||||
command_topic = "shellies/shellypro3-c8f09e894448/rpc";
|
||||
command_topic = "shellies/${switch.id}/rpc";
|
||||
payload_on = "{\"id\":${switch.relay}, \"src\":\"homeassistant\", \"method\":\"Switch.Set\", \"params\":{\"id\":${switch.relay}, \"on\":true}}";
|
||||
payload_off = "{\"id\":${switch.relay}, \"src\":\"homeassistant\", \"method\":\"Switch.Set\", \"params\":{\"id\":${switch.relay}, \"on\":false}}";
|
||||
availability_topic = "shellies/shellypro3-${switch.id}/online";
|
||||
availability_topic = "shellies/${switch.id}/online";
|
||||
payload_available = "true";
|
||||
payload_not_available = "false";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user