From 9dc1865ab3f78ece114c4b4b581384834af68705 Mon Sep 17 00:00:00 2001 From: Martin Bauer Date: Sun, 3 May 2020 20:23:53 +0000 Subject: [PATCH] New stuff for standalone ha - automations for scenes first floor - new scenes for bathroom, kids room --- automations/esszimmerradio_an_aus.yaml | 117 +++++ automations/esszimmerradio_oben_an_aus.yaml | 0 automations/ir_bedroom.yaml | 550 ++++++++++++++++++++ automations/ir_first_floor_dining_room.yaml | 274 ++++++++++ automations/ir_first_floor_living_room.yaml | 274 ++++++++++ automations/ir_living_area.yaml | 386 ++++++++++++++ automations/oben_licht.yaml | 217 ++++++++ config_creation/fhem.cfg | 168 +++--- config_creation/fhem.yaml | 45 +- config_creation/groups.yaml | 6 +- config_creation/manual_config.yaml | 25 +- config_creation/secrets.yaml | 1 + scenes/bad.yaml | 18 + scenes/kinderzimmer.yaml | 22 +- www/custom_ui/room-glance-card.js | 153 +++--- www/custom_ui/state-card-custom-cover.js | 2 +- 16 files changed, 2067 insertions(+), 191 deletions(-) create mode 100644 automations/esszimmerradio_an_aus.yaml create mode 100644 automations/esszimmerradio_oben_an_aus.yaml create mode 100644 automations/ir_bedroom.yaml create mode 100644 automations/ir_first_floor_dining_room.yaml create mode 100644 automations/ir_first_floor_living_room.yaml create mode 100644 automations/ir_living_area.yaml create mode 100644 automations/oben_licht.yaml create mode 100644 scenes/bad.yaml diff --git a/automations/esszimmerradio_an_aus.yaml b/automations/esszimmerradio_an_aus.yaml new file mode 100644 index 0000000..1a0aed4 --- /dev/null +++ b/automations/esszimmerradio_an_aus.yaml @@ -0,0 +1,117 @@ +# ------ Einschalten --------------- + +- alias: EsszimmerRadio Oben an + trigger: + # Switch on when pushing play or power + - platform: event + event_type: ir_command_received + event_data: + button_name: key_play + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_power + repeat_counter: 0 + host: esszimmerradio.fritz.box + # Switch on when pressing any number button + - platform: event + event_type: ir_command_received + event_data: + button_name: btn_1 + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: btn_2 + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: btn_3 + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: btn_4 + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: btn_5 + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: btn_6 + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: btn_7 + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: btn_8 + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: btn_9 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: switch.turn_on + data: + entity_id: switch.esszimmer_oben_radio_steckdose1 + + +# ------ Ausschalten --------------- + +- alias: EsszimmerRadio Oben aus + trigger: + # Switch off when pushing goto or pause + - platform: event + event_type: ir_command_received + event_data: + button_name: key_goto + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_pause + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: switch.turn_off + data: + entity_id: switch.esszimmer_oben_radio_steckdose1 + + +# ------ Squeezelite neustart --------------- + +#- alias: EsszimmerRadio oben squeezelite neustart +# trigger: +# # Switch off when pushing goto or pause +# - platform: event +# event_type: ir_command_received +# event_data: +# button_name: key_record +# repeat_counter: 0 +# host: esszimmerradio.fritz.box +# action: +# service: sysdweb.restart +# data: +# hostname: esszimmerradio.fritz.box +# service_name: squeezelite diff --git a/automations/esszimmerradio_oben_an_aus.yaml b/automations/esszimmerradio_oben_an_aus.yaml new file mode 100644 index 0000000..e69de29 diff --git a/automations/ir_bedroom.yaml b/automations/ir_bedroom.yaml new file mode 100644 index 0000000..98a5ab1 --- /dev/null +++ b/automations/ir_bedroom.yaml @@ -0,0 +1,550 @@ +# Dont' edit manually! this is generated! + +- alias: IR bedroompi.fritz.box btn_1 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_1 + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Good Morning + media_content_type: music + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box btn_2 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_2 + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Good Night Long + media_content_type: music + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box btn_3 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_3 + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Good Night + media_content_type: music + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box btn_4 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_4 + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bar Classics + media_content_type: music + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box btn_5 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_5 + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Sentimental Moods + media_content_type: music + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box btn_6 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_6 + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Pop + media_content_type: music + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box btn_7 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_7 + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: B 5 aktuell + media_content_type: channel + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box btn_8 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_8 + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: BR-Klassik + media_content_type: channel + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box btn_9 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_9 + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: http://opml.radiotime.com/Tune.ashx?id=s25028&formats=aac,ogg,mp3 + media_content_type: music + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box key_numeric_star + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_numeric_star + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Antenne Bayern + media_content_type: channel + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box btn_0 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_0 + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bayern 3 + media_content_type: channel + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box key_numeric_pound + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_numeric_pound + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bayern 2 + media_content_type: channel + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box key_red + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_red + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: scene.turn_on + data: + entity_id: scene.schlafzimmer_orange +- alias: IR bedroompi.fritz.box key_green + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_green + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: scene.turn_on + data: + entity_id: scene.schlafzimmer_rot +- alias: IR bedroompi.fritz.box key_yellow + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_yellow + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: scene.turn_on + data: + entity_id: scene.schlafzimmer_ganz_hell +- alias: IR bedroompi.fritz.box key_blue + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_blue + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: scene.turn_on + data: + entity_id: scene.schlafzimmer_blau +- alias: IR bedroompi.fritz.box key_tv + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_tv + repeat_counter: 0 + host: bedroompi.fritz.box + action: + - service: script.turn_on + data: + variables: + media_content_id: spotify:playlist:37i9dQZF1DXbcPC6Vvqudd + light_off_secs: 900 + music_off_secs: 2700 + shuffle: 1 + entity_id: script.timed_sleep +- alias: IR bedroompi.fritz.box key_video + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_video + repeat_counter: 0 + host: bedroompi.fritz.box + action: + - service: script.turn_on + data: + variables: + media_content_id: Good Night + light_off_secs: 900 + music_off_secs: 2700 + shuffle: 0 + entity_id: script.timed_sleep +- alias: IR bedroompi.fritz.box key_music + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_music + repeat_counter: 0 + host: bedroompi.fritz.box + action: + - service: script.turn_on + data: + variables: + media_content_id: spotify:playlist:37i9dQZF1DXbcPC6Vvqudd + light_off_secs: 300 + music_off_secs: 1200 + shuffle: 1 + entity_id: script.timed_sleep +- alias: IR bedroompi.fritz.box key_pictures + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_pictures + repeat_counter: 0 + host: bedroompi.fritz.box + action: + - service: script.turn_on + data: + variables: + media_content_id: Good Night + light_off_secs: 300 + music_off_secs: 1200 + shuffle: 0 + entity_id: script.timed_sleep +- alias: IR bedroompi.fritz.box key_power + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_power + repeat_counter: 0 + host: bedroompi.fritz.box + action: + - service: media_player.media_pause + data: + entity_id: media_player.bedroompi + - service: light.turn_off + data: + entity_id: group.bedroom +- alias: IR bedroompi.fritz.box key_ok + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_ok + repeat_counter: 0 + host: bedroompi.fritz.box + action: + - service: cover.close_cover + data: + entity_id: cover.schlafzimmer_rollo_gross + - service: cover_half.set_half + data: + entity_id: cover.schlafzimmer_rollo_klein +- alias: IR bedroompi.fritz.box key_mute + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_mute + repeat_counter: 0 + host: bedroompi.fritz.box + action: + - service: light.turn_off + data: + entity_id: group.all_downstairs_but_bedroom_and_outside +- alias: IR bedroompi.fritz.box key_channel + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_channel + repeat_counter: 0 + host: bedroompi.fritz.box + action: + - service: light.turn_off + data: + entity_id: group.all_downstairs_but_bedroom +- alias: IR bedroompi.fritz.box Rollo auf + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_up + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: cover.open_cover + data: + entity_id: group.bedroom +- alias: IR bedroompi.fritz.box Rollo zu + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_down + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: cover.close_cover + data: + entity_id: group.bedroom +- alias: IR bedroompi.fritz.box Rollo halb + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_left + repeat_counter: 0 + host: bedroompi.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_right + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: cover_half.set_half + data: + entity_id: group.bedroom +- alias: IR bedroompi.fritz.box Licht heller + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_channelup + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: dimmer.dim + data: + offset: 30 + entity_id: group.bedroom +- alias: IR bedroompi.fritz.box Licht dunkler + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_channeldown + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: dimmer.dim + data: + offset: -30 + entity_id: group.bedroom +- alias: IR bedroompi.fritz.box Licht viel heller + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_menu + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: dimmer.dim + data: + offset: 130 + entity_id: group.bedroom +- alias: IR bedroompi.fritz.box Licht viel dunkler + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_stop + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: dimmer.dim + data: + offset: -130 + entity_id: group.bedroom +- alias: IR bedroompi.fritz.box Licht aus + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_goto + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: light.turn_off + data: + entity_id: group.bedroom +- alias: IR bedroompi.fritz.box Musik Play/Pause + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_play + repeat_counter: 0 + host: bedroompi.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_pause + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.media_play_pause + data: + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box Musik Next + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_forward + repeat_counter: 0 + host: bedroompi.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_fastforward + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.media_next_track + data: + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box Musik Prev + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_previous + repeat_counter: 0 + host: bedroompi.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_rewind + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.media_next_track + data: + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box Vol Up + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_volumeup + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.volume_up + data: + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box Vol Down + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_volumedown + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.volume_down + data: + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box Shuffle On + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_menu + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.shuffle_set + data: + shuffle: true + entity_id: media_player.bedroompi +- alias: IR bedroompi.fritz.box Shuffle Off + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_exit + repeat_counter: 0 + host: bedroompi.fritz.box + action: + service: media_player.shuffle_set + data: + shuffle: false + entity_id: media_player.bedroompi diff --git a/automations/ir_first_floor_dining_room.yaml b/automations/ir_first_floor_dining_room.yaml new file mode 100644 index 0000000..859ad10 --- /dev/null +++ b/automations/ir_first_floor_dining_room.yaml @@ -0,0 +1,274 @@ +# Dont' edit manually! this is generated! + +- alias: IR esszimmerradio.fritz.box btn_1 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_1 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bayern 1 + media_content_type: channel + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box btn_2 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_2 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bayern 2 + media_content_type: channel + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box btn_3 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_3 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: BR Heimat + media_content_type: channel + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box btn_4 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_4 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bayern+ + media_content_type: channel + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box btn_5 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_5 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: B 5 Aktuell + media_content_type: channel + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box btn_6 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_6 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: BR-Klassik + media_content_type: channel + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box btn_7 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_7 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Gesammelte Weihnachtslieder + media_content_type: music + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box btn_8 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_8 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Harmonic Brass Christmas + media_content_type: music + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box btn_9 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_9 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: German Brass Christmas + media_content_type: music + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box key_numeric_star + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_numeric_star + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Weihnachten mit den Wiener Sängerknaben + media_content_type: music + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box btn_0 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_0 + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Weihnachten mit den Wiener Sängerknaben + media_content_type: music + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box key_numeric_pound + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_numeric_pound + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.play_media + data: + media_content_id: SammlungGeorg + media_content_type: music + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box Musik Play/Pause + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_play + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_pause + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.media_play_pause + data: + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box Musik Next + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_forward + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_fastforward + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.media_next_track + data: + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box Musik Prev + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_previous + repeat_counter: 0 + host: esszimmerradio.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_rewind + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.media_next_track + data: + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box Vol Up + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_volumeup + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.volume_up + data: + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box Vol Down + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_volumedown + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.volume_down + data: + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box Shuffle On + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_menu + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.shuffle_set + data: + shuffle: true + entity_id: media_player.esszimmer +- alias: IR esszimmerradio.fritz.box Shuffle Off + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_exit + repeat_counter: 0 + host: esszimmerradio.fritz.box + action: + service: media_player.shuffle_set + data: + shuffle: false + entity_id: media_player.esszimmer diff --git a/automations/ir_first_floor_living_room.yaml b/automations/ir_first_floor_living_room.yaml new file mode 100644 index 0000000..1664ec6 --- /dev/null +++ b/automations/ir_first_floor_living_room.yaml @@ -0,0 +1,274 @@ +# Dont' edit manually! this is generated! + +- alias: IR musikserverwohnzimmeroben.fritz.box btn_1 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_1 + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bayern 1 + media_content_type: channel + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box btn_2 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_2 + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bayern 2 + media_content_type: channel + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box btn_3 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_3 + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: BR Heimat + media_content_type: channel + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box btn_4 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_4 + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bayern+ + media_content_type: channel + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box btn_5 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_5 + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: B 5 Aktuell + media_content_type: channel + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box btn_6 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_6 + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: BR-Klassik + media_content_type: channel + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box btn_7 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_7 + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Gesammelte Weihnachtslieder + media_content_type: music + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box btn_8 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_8 + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Harmonic Brass Christmas + media_content_type: music + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box btn_9 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_9 + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: German Brass Christmas + media_content_type: music + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box key_numeric_star + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_numeric_star + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Weihnachten mit den Wiener Sängerknaben + media_content_type: music + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box btn_0 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_0 + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Weihnachten mit den Wiener Sängerknaben + media_content_type: music + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box key_numeric_pound + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_numeric_pound + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.play_media + data: + media_content_id: SammlungGeorg + media_content_type: music + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box Musik Play/Pause + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_play + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_pause + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.media_play_pause + data: + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box Musik Next + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_forward + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_fastforward + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.media_next_track + data: + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box Musik Prev + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_previous + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_rewind + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.media_next_track + data: + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box Vol Up + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_volumeup + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.volume_up + data: + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box Vol Down + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_volumedown + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.volume_down + data: + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box Shuffle On + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_menu + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.shuffle_set + data: + shuffle: true + entity_id: media_player.wohnzimmer +- alias: IR musikserverwohnzimmeroben.fritz.box Shuffle Off + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_exit + repeat_counter: 0 + host: musikserverwohnzimmeroben.fritz.box + action: + service: media_player.shuffle_set + data: + shuffle: false + entity_id: media_player.wohnzimmer diff --git a/automations/ir_living_area.yaml b/automations/ir_living_area.yaml new file mode 100644 index 0000000..27a86b0 --- /dev/null +++ b/automations/ir_living_area.yaml @@ -0,0 +1,386 @@ +# Dont' edit manually! this is generated! + +- alias: IR kitchenpi.fritz.box btn_4 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_4 + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bar Classics + media_content_type: music + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box btn_5 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_5 + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Sentimental Moods + media_content_type: music + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box btn_6 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_6 + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Pop + media_content_type: music + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box btn_7 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_7 + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: B 5 aktuell + media_content_type: channel + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box btn_8 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_8 + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: BR-Klassik + media_content_type: channel + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box btn_9 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_9 + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: http://opml.radiotime.com/Tune.ashx?id=s25028&formats=aac,ogg,mp3 + media_content_type: music + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box key_numeric_star + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_numeric_star + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Antenne Bayern + media_content_type: channel + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box btn_0 + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: btn_0 + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bayern 3 + media_content_type: channel + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box key_numeric_pound + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_numeric_pound + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.play_media + data: + media_content_id: Bayern 2 + media_content_type: channel + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box key_red + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_red + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: scene.turn_on + data: + entity_id: scene.wohnbereich_orange +- alias: IR kitchenpi.fritz.box key_green + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_green + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: scene.turn_on + data: + entity_id: scene.wohnbereich_grun +- alias: IR kitchenpi.fritz.box key_yellow + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_yellow + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: scene.turn_on + data: + entity_id: scene.wohnbereich_hell +- alias: IR kitchenpi.fritz.box key_blue + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_blue + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: scene.turn_on + data: + entity_id: scene.wohnbereich_blau_grun +- alias: IR kitchenpi.fritz.box Rollo auf + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_up + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: cover.open_cover + data: + entity_id: group.living_area +- alias: IR kitchenpi.fritz.box Rollo zu + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_down + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: cover.close_cover + data: + entity_id: group.living_area +- alias: IR kitchenpi.fritz.box Rollo halb + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_left + repeat_counter: 0 + host: kitchenpi.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_right + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: cover_half.set_half + data: + entity_id: group.living_area +- alias: IR kitchenpi.fritz.box Licht heller + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_channelup + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: dimmer.dim + data: + offset: 30 + entity_id: group.living_area +- alias: IR kitchenpi.fritz.box Licht dunkler + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_channeldown + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: dimmer.dim + data: + offset: -30 + entity_id: group.living_area +- alias: IR kitchenpi.fritz.box Licht viel heller + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_menu + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: dimmer.dim + data: + offset: 130 + entity_id: group.living_area +- alias: IR kitchenpi.fritz.box Licht viel dunkler + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_stop + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: dimmer.dim + data: + offset: -130 + entity_id: group.living_area +- alias: IR kitchenpi.fritz.box Licht aus + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_goto + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: light.turn_off + data: + entity_id: group.living_area +- alias: IR kitchenpi.fritz.box Musik Play/Pause + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_play + repeat_counter: 0 + host: kitchenpi.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_pause + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.media_play_pause + data: + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box Musik Next + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_forward + repeat_counter: 0 + host: kitchenpi.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_fastforward + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.media_next_track + data: + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box Musik Prev + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_previous + repeat_counter: 0 + host: kitchenpi.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_rewind + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.media_next_track + data: + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box Vol Up + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_volumeup + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.volume_up + data: + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box Vol Down + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_volumedown + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.volume_down + data: + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box Shuffle On + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_menu + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.shuffle_set + data: + shuffle: true + entity_id: media_player.kitchenpi +- alias: IR kitchenpi.fritz.box Shuffle Off + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_exit + repeat_counter: 0 + host: kitchenpi.fritz.box + action: + service: media_player.shuffle_set + data: + shuffle: false + entity_id: media_player.kitchenpi diff --git a/automations/oben_licht.yaml b/automations/oben_licht.yaml new file mode 100644 index 0000000..fe38bc6 --- /dev/null +++ b/automations/oben_licht.yaml @@ -0,0 +1,217 @@ +- alias: Oben Wohnzimmer IR key_red next scene + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_red + repeat_counter: 0 + host: musikserverWohnzimmerOben.fritz.box + action: + service: counter.increment + entity_id: counter.licht_szene_oben_counter + + +- alias: Oben Wohnzimmer IR key_green prev scene + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_green + repeat_counter: 0 + host: musikserverWohnzimmerOben.fritz.box + action: + service: counter.decrement + entity_id: counter.licht_szene_oben_counter + +- alias: Oben Wohnzimmer IR Licht heller + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_channelup + repeat_counter: 0 + host: musikserverWohnzimmerOben.fritz.box + action: + service: dimmer.dim + data: + offset: 30 + entity_id: light.lampe_ersterstock + +- alias: Oben Wohnzimmer IR Licht dunkler + trigger: + platform: event + event_type: ir_command_received + event_data: + button_name: key_channeldown + repeat_counter: 0 + host: musikserverWohnzimmerOben.fritz.box + action: + service: dimmer.dim + data: + offset: -30 + entity_id: light.lampe_ersterstock + +- alias: Oben Wohnzimmer IR Licht aus + trigger: + - platform: event + event_type: ir_command_received + event_data: + button_name: key_green + repeat_counter: 0 + host: musikserverWohnzimmerOben.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_blue + repeat_counter: 0 + host: musikserverWohnzimmerOben.fritz.box + - platform: event + event_type: ir_command_received + event_data: + button_name: key_yellow + repeat_counter: 0 + host: musikserverWohnzimmerOben.fritz.box + action: + service: light.turn_off + data: + entity_id: light.lampe_ersterstock + + +# --------------------------------- Szenen ------------------- + +- alias: Oben Szene 0 + trigger: + platform: state + entity_id: counter.licht_szene_oben_counter + condition: + condition: template + value_template: "{{ states('counter.licht_szene_oben_counter')|int % 9 == 0 }}" + action: + service: light.turn_on + data: + entity_id: light.lampe_ersterstock + color_temp: 492 + + +- alias: Oben Szene 1 + trigger: + platform: state + entity_id: counter.licht_szene_oben_counter + condition: + condition: template + value_template: "{{ states('counter.licht_szene_oben_counter')|int % 9 == 1 }}" + action: + service: light.turn_on + data: + entity_id: light.lampe_ersterstock + xy_color: + - 0.5794 + - 0.3752 + + +- alias: Oben Szene 2 + trigger: + platform: state + entity_id: counter.licht_szene_oben_counter + condition: + condition: template + value_template: "{{ states('counter.licht_szene_oben_counter')|int % 9 == 2 }}" + action: + service: light.turn_on + data: + entity_id: light.lampe_ersterstock + xy_color: + - 0.5535 + - 0.4104 + +- alias: Oben Szene 3 + trigger: + platform: state + entity_id: counter.licht_szene_oben_counter + condition: + condition: template + value_template: "{{ states('counter.licht_szene_oben_counter')|int % 9 == 3 }}" + action: + service: light.turn_on + data: + entity_id: light.lampe_ersterstock + xy_color: + - 0.4662 + - 0.3252 + +- alias: Oben Szene 4 + trigger: + platform: state + entity_id: counter.licht_szene_oben_counter + condition: + condition: template + value_template: "{{ states('counter.licht_szene_oben_counter')|int % 9 == 4 }}" + action: + service: light.turn_on + data: + entity_id: light.lampe_ersterstock + xy_color: + - 0.3423 + - 0.2252 + + +- alias: Oben Szene 5 + trigger: + platform: state + entity_id: counter.licht_szene_oben_counter + condition: + condition: template + value_template: "{{ states('counter.licht_szene_oben_counter')|int % 9 == 5 }}" + action: + service: light.turn_on + data: + entity_id: light.lampe_ersterstock + xy_color: + - 0.346 + - 0.394 + +- alias: Oben Szene 6 + trigger: + platform: state + entity_id: counter.licht_szene_oben_counter + condition: + condition: template + value_template: "{{ states('counter.licht_szene_oben_counter')|int % 9 == 6 }}" + action: + service: light.turn_on + data: + entity_id: light.lampe_ersterstock + xy_color: + - 0.4119 + - 0.3671 + + +- alias: Oben Szene 7 + trigger: + platform: state + entity_id: counter.licht_szene_oben_counter + condition: + condition: template + value_template: "{{ states('counter.licht_szene_oben_counter')|int % 9 == 7 }}" + action: + service: light.turn_on + data: + entity_id: light.lampe_ersterstock + xy_color: + - 0.408 + - 0.517 + + +- alias: Oben Szene 8 + trigger: + platform: state + entity_id: counter.licht_szene_oben_counter + condition: + condition: template + value_template: "{{ states('counter.licht_szene_oben_counter')|int % 9 == 8 }}" + action: + service: light.turn_on + data: + entity_id: light.lampe_ersterstock + color_temp: 202 + diff --git a/config_creation/fhem.cfg b/config_creation/fhem.cfg index a1dffbd..b9db498 100644 --- a/config_creation/fhem.cfg +++ b/config_creation/fhem.cfg @@ -1,6 +1,6 @@ attr global userattr cmdIcon devStateIcon devStateStyle icon sortby webCmd widgetOverride attr global autoload_undefined_devices 1 -attr global logfile ./log/fhem-%Y-%m.log +attr global logfile - attr global modpath . attr global motd Error messages while initializing FHEM:\ attr global statefile ./log/fhem.save @@ -8,10 +8,9 @@ attr global updateInBackground 1 attr global verbose 3 attr global genericDeviceType:switch,light,blind,thermostat - define telnetPort telnet 7072 global -define WEB FHEMWEB 8083 global +#define WEB FHEMWEB 8083 global #define WEBphone FHEMWEB 8084 global #attr WEBphone stylesheetPrefix smallscreen @@ -19,8 +18,8 @@ define WEB FHEMWEB 8083 global #define WEBtablet FHEMWEB 8085 global #attr WEBtablet stylesheetPrefix touchpad -# Fake FileLog entry, to access the fhem log from FHEMWEB -define Logfile FileLog ./log/fhem-%Y-%m.log fakelog +# Fake FileLog entry, to access the fhem log from FHEMWEB +#define Logfile FileLog ./log/fhem-%Y-%m.log fakelog define autocreate autocreate attr autocreate autosave 1 @@ -29,46 +28,46 @@ attr autocreate autosave 1 #define eventTypes eventTypes ./log/eventTypes.txt # Disable this to avoid looking for new USB devices on startup -define initialUsbCheck notify global:INITIALIZED usb create +#define initialUsbCheck notify global:INITIALIZED usb create -define CUL_0 CUL /dev/ttyACM0@9600 1034 +define CUL_0 CUL __device_placeholder__@9600 1034 attr CUL_0 hmId 62a77d attr CUL_0 rfmode HomeMatic -define ArbeitszimmerMartin_Rollo CUL_HM 339336 -attr ArbeitszimmerMartin_Rollo IODev CUL_0 -attr ArbeitszimmerMartin_Rollo autoReadReg 4_reqStatus -attr ArbeitszimmerMartin_Rollo expert 2_full -attr ArbeitszimmerMartin_Rollo firmware 2.3 -attr ArbeitszimmerMartin_Rollo model HM-LC-Bl1PBU-FM -attr ArbeitszimmerMartin_Rollo room CUL_HM -attr ArbeitszimmerMartin_Rollo serialNr LEQ1440417 -attr ArbeitszimmerMartin_Rollo subType blindActuator -attr ArbeitszimmerMartin_Rollo webCmd statusRequest:toggleDir:on:off:up:down:stop -attr ArbeitszimmerMartin_Rollo room Homekit +define Arbeitszimmer_Rollo CUL_HM 339336 +attr Arbeitszimmer_Rollo IODev CUL_0 +attr Arbeitszimmer_Rollo autoReadReg 4_reqStatus +attr Arbeitszimmer_Rollo expert 2_full +attr Arbeitszimmer_Rollo firmware 2.3 +attr Arbeitszimmer_Rollo model HM-LC-Bl1PBU-FM +attr Arbeitszimmer_Rollo room CUL_HM +attr Arbeitszimmer_Rollo serialNr LEQ1440417 +attr Arbeitszimmer_Rollo subType blindActuator +attr Arbeitszimmer_Rollo webCmd statusRequest:toggleDir:on:off:up:down:stop +attr Arbeitszimmer_Rollo room Homekit -define ArbeitszimmerMartin_Deckenlampe CUL_HM 1AA382 -attr ArbeitszimmerMartin_Deckenlampe IODev CUL_0 -attr ArbeitszimmerMartin_Deckenlampe autoReadReg 4_reqStatus -attr ArbeitszimmerMartin_Deckenlampe expert 2_full -attr ArbeitszimmerMartin_Deckenlampe firmware 2.2 -attr ArbeitszimmerMartin_Deckenlampe model HM-LC-Dim1TPBU-FM -attr ArbeitszimmerMartin_Deckenlampe room CUL_HM -attr ArbeitszimmerMartin_Deckenlampe serialNr JEQ0201891 -attr ArbeitszimmerMartin_Deckenlampe subType dimmer -attr ArbeitszimmerMartin_Deckenlampe webCmd getConfig:clear msgEvents -define ArbeitszimmerMartin_Deckenlampe_Sw CUL_HM 1AA38201 -attr ArbeitszimmerMartin_Deckenlampe_Sw model HM-LC-Dim1TPBU-FM -attr ArbeitszimmerMartin_Deckenlampe_Sw peerIDs -attr ArbeitszimmerMartin_Deckenlampe_Sw webCmd statusRequest:toggle:on:off:up:down -define ArbeitszimmerMartin_Deckenlampe_Sw1_V_01 CUL_HM 1AA38202 -attr ArbeitszimmerMartin_Deckenlampe_Sw1_V_01 model HM-LC-Dim1TPBU-FM -attr ArbeitszimmerMartin_Deckenlampe_Sw1_V_01 webCmd statusRequest:toggle:on:off:up:down -define ArbeitszimmerMartin_Deckenlampe_Sw1_V_02 CUL_HM 1AA38203 -attr ArbeitszimmerMartin_Deckenlampe_Sw1_V_02 model HM-LC-Dim1TPBU-FM -attr ArbeitszimmerMartin_Deckenlampe_Sw1_V_02 webCmd statusRequest:toggle:on:off:up:down -attr ArbeitszimmerMartin_Deckenlampe room Homekit +define Arbeitszimmer_Deckenlampe CUL_HM 1AA382 +attr Arbeitszimmer_Deckenlampe IODev CUL_0 +attr Arbeitszimmer_Deckenlampe autoReadReg 4_reqStatus +attr Arbeitszimmer_Deckenlampe expert 2_full +attr Arbeitszimmer_Deckenlampe firmware 2.2 +attr Arbeitszimmer_Deckenlampe model HM-LC-Dim1TPBU-FM +attr Arbeitszimmer_Deckenlampe room CUL_HM +attr Arbeitszimmer_Deckenlampe serialNr JEQ0201891 +attr Arbeitszimmer_Deckenlampe subType dimmer +attr Arbeitszimmer_Deckenlampe webCmd getConfig:clear msgEvents +define Arbeitszimmer_Deckenlampe_Sw CUL_HM 1AA38201 +attr Arbeitszimmer_Deckenlampe_Sw model HM-LC-Dim1TPBU-FM +attr Arbeitszimmer_Deckenlampe_Sw peerIDs +attr Arbeitszimmer_Deckenlampe_Sw webCmd statusRequest:toggle:on:off:up:down +define Arbeitszimmer_Deckenlampe_Sw1_V_01 CUL_HM 1AA38202 +attr Arbeitszimmer_Deckenlampe_Sw1_V_01 model HM-LC-Dim1TPBU-FM +attr Arbeitszimmer_Deckenlampe_Sw1_V_01 webCmd statusRequest:toggle:on:off:up:down +define Arbeitszimmer_Deckenlampe_Sw1_V_02 CUL_HM 1AA38203 +attr Arbeitszimmer_Deckenlampe_Sw1_V_02 model HM-LC-Dim1TPBU-FM +attr Arbeitszimmer_Deckenlampe_Sw1_V_02 webCmd statusRequest:toggle:on:off:up:down +attr Arbeitszimmer_Deckenlampe room Homekit @@ -84,7 +83,7 @@ attr Schlafzimmer_Deckenlampe subType dimmer attr Schlafzimmer_Deckenlampe webCmd getConfig:clear msgEvents define Schlafzimmer_Deckenlampe_Sw CUL_HM 1AA1C701 attr Schlafzimmer_Deckenlampe_Sw model HM-LC-Dim1TPBU-FM -attr Schlafzimmer_Deckenlampe_Sw peerIDs +attr Schlafzimmer_Deckenlampe_Sw peerIDs attr Schlafzimmer_Deckenlampe_Sw webCmd statusRequest:toggle:on:off:up:down define Schlafzimmer_Deckenlampe_Sw1_V_01 CUL_HM 1AA1C702 attr Schlafzimmer_Deckenlampe_Sw1_V_01 model HM-LC-Dim1TPBU-FM @@ -96,7 +95,6 @@ attr Schlafzimmer_Deckenlampe room Homekit - define Schlafzimmer_RolloKlein CUL_HM 338C2A attr Schlafzimmer_RolloKlein IODev CUL_0 attr Schlafzimmer_RolloKlein autoReadReg 4_reqStatus @@ -126,42 +124,42 @@ attr Schlafzimmer_RolloGross room Homekit -define ArbeitszimmerRebecca_Deckenlampe CUL_HM 1B5305 -attr ArbeitszimmerRebecca_Deckenlampe IODev CUL_0 -attr ArbeitszimmerRebecca_Deckenlampe autoReadReg 4_reqStatus -attr ArbeitszimmerRebecca_Deckenlampe expert 2_full -attr ArbeitszimmerRebecca_Deckenlampe firmware 2.2 -attr ArbeitszimmerRebecca_Deckenlampe model HM-LC-Dim1TPBU-FM -attr ArbeitszimmerRebecca_Deckenlampe room CUL_HM -attr ArbeitszimmerRebecca_Deckenlampe serialNr JEQ0199674 -attr ArbeitszimmerRebecca_Deckenlampe subType dimmer -attr ArbeitszimmerRebecca_Deckenlampe webCmd getConfig:clear msgEvents -define ArbeitszimmerRebecca_Deckenlampe_Sw CUL_HM 1B530501 -attr ArbeitszimmerRebecca_Deckenlampe_Sw model HM-LC-Dim1TPBU-FM -attr ArbeitszimmerRebecca_Deckenlampe_Sw peerIDs -attr ArbeitszimmerRebecca_Deckenlampe_Sw webCmd statusRequest:toggle:on:off:up:down -define ArbeitszimmerRebecca_Deckenlampe_Sw1_V_01 CUL_HM 1B530502 -attr ArbeitszimmerRebecca_Deckenlampe_Sw1_V_01 model HM-LC-Dim1TPBU-FM -attr ArbeitszimmerRebecca_Deckenlampe_Sw1_V_01 webCmd statusRequest:toggle:on:off:up:down -define ArbeitszimmerRebecca_Deckenlampe_Sw1_V_02 CUL_HM 1B530503 -attr ArbeitszimmerRebecca_Deckenlampe_Sw1_V_02 model HM-LC-Dim1TPBU-FM -attr ArbeitszimmerRebecca_Deckenlampe_Sw1_V_02 webCmd statusRequest:toggle:on:off:up:down -attr ArbeitszimmerRebecca_Deckenlampe room Homekit +define Kinderzimmer_Deckenlampe CUL_HM 1B5305 +attr Kinderzimmer_Deckenlampe IODev CUL_0 +attr Kinderzimmer_Deckenlampe autoReadReg 4_reqStatus +attr Kinderzimmer_Deckenlampe expert 2_full +attr Kinderzimmer_Deckenlampe firmware 2.2 +attr Kinderzimmer_Deckenlampe model HM-LC-Dim1TPBU-FM +attr Kinderzimmer_Deckenlampe room CUL_HM +attr Kinderzimmer_Deckenlampe serialNr JEQ0199674 +attr Kinderzimmer_Deckenlampe subType dimmer +attr Kinderzimmer_Deckenlampe webCmd getConfig:clear msgEvents +define Kinderzimmer_Deckenlampe_Sw CUL_HM 1B530501 +attr Kinderzimmer_Deckenlampe_Sw model HM-LC-Dim1TPBU-FM +attr Kinderzimmer_Deckenlampe_Sw peerIDs +attr Kinderzimmer_Deckenlampe_Sw webCmd statusRequest:toggle:on:off:up:down +define Kinderzimmer_Deckenlampe_Sw1_V_01 CUL_HM 1B530502 +attr Kinderzimmer_Deckenlampe_Sw1_V_01 model HM-LC-Dim1TPBU-FM +attr Kinderzimmer_Deckenlampe_Sw1_V_01 webCmd statusRequest:toggle:on:off:up:down +define Kinderzimmer_Deckenlampe_Sw1_V_02 CUL_HM 1B530503 +attr Kinderzimmer_Deckenlampe_Sw1_V_02 model HM-LC-Dim1TPBU-FM +attr Kinderzimmer_Deckenlampe_Sw1_V_02 webCmd statusRequest:toggle:on:off:up:down +attr Kinderzimmer_Deckenlampe room Homekit -define ArbeitszimmerRebecca_Rollo CUL_HM 1AF5DD -attr ArbeitszimmerRebecca_Rollo IODev CUL_0 -attr ArbeitszimmerRebecca_Rollo autoReadReg 4_reqStatus -attr ArbeitszimmerRebecca_Rollo expert 2_full -attr ArbeitszimmerRebecca_Rollo firmware 2.1 -attr ArbeitszimmerRebecca_Rollo model HM-LC-Bl1PBU-FM -attr ArbeitszimmerRebecca_Rollo room CUL_HM -attr ArbeitszimmerRebecca_Rollo serialNr JEQ0109195 -attr ArbeitszimmerRebecca_Rollo subType blindActuator -attr ArbeitszimmerRebecca_Rollo webCmd statusRequest:toggleDir:on:off:up:down:stop -attr ArbeitszimmerRebecca_Rollo room Homekit +define Kinderzimmer_Rollo CUL_HM 1AF5DD +attr Kinderzimmer_Rollo IODev CUL_0 +attr Kinderzimmer_Rollo autoReadReg 4_reqStatus +attr Kinderzimmer_Rollo expert 2_full +attr Kinderzimmer_Rollo firmware 2.1 +attr Kinderzimmer_Rollo model HM-LC-Bl1PBU-FM +attr Kinderzimmer_Rollo room CUL_HM +attr Kinderzimmer_Rollo serialNr JEQ0109195 +attr Kinderzimmer_Rollo subType blindActuator +attr Kinderzimmer_Rollo webCmd statusRequest:toggleDir:on:off:up:down:stop +attr Kinderzimmer_Rollo room Homekit @@ -193,18 +191,18 @@ attr Bad_Luefter room Homekit -define ArbeitszimmerMartin_Bewegungsmelder CUL_HM 2F2A4B -attr ArbeitszimmerMartin_Bewegungsmelder IODev CUL_0 -attr ArbeitszimmerMartin_Bewegungsmelder actCycle 000:20 -attr ArbeitszimmerMartin_Bewegungsmelder actStatus alive -attr ArbeitszimmerMartin_Bewegungsmelder autoReadReg 4_reqStatus -attr ArbeitszimmerMartin_Bewegungsmelder expert 2_full -attr ArbeitszimmerMartin_Bewegungsmelder firmware 1.6 -attr ArbeitszimmerMartin_Bewegungsmelder model HM-SEC-MDIR-2 -attr ArbeitszimmerMartin_Bewegungsmelder room CUL_HM -attr ArbeitszimmerMartin_Bewegungsmelder serialNr LEQ0797237 -attr ArbeitszimmerMartin_Bewegungsmelder subType motionDetector -attr ArbeitszimmerMartin_Bewegungsmelder room Homekit +define Arbeitszimmer_Bewegungsmelder CUL_HM 2F2A4B +attr Arbeitszimmer_Bewegungsmelder IODev CUL_0 +attr Arbeitszimmer_Bewegungsmelder actCycle 000:20 +attr Arbeitszimmer_Bewegungsmelder actStatus alive +attr Arbeitszimmer_Bewegungsmelder autoReadReg 4_reqStatus +attr Arbeitszimmer_Bewegungsmelder expert 2_full +attr Arbeitszimmer_Bewegungsmelder firmware 1.6 +attr Arbeitszimmer_Bewegungsmelder model HM-SEC-MDIR-2 +attr Arbeitszimmer_Bewegungsmelder room CUL_HM +attr Arbeitszimmer_Bewegungsmelder serialNr LEQ0797237 +attr Arbeitszimmer_Bewegungsmelder subType motionDetector +attr Arbeitszimmer_Bewegungsmelder room Homekit define ActionDetector CUL_HM 000000 diff --git a/config_creation/fhem.yaml b/config_creation/fhem.yaml index 5430797..d2dcc13 100644 --- a/config_creation/fhem.yaml +++ b/config_creation/fhem.yaml @@ -14,23 +14,22 @@ light: - name: Arbeitszimmer Deckenlampe dimmer: True fhem_ids: - - ArbeitszimmerMartin_Deckenlampe_Sw - - ArbeitszimmerMartin_Deckenlampe - - ArbeitszimmerMartin_Deckenlampe_Sw1_V_01 - - ArbeitszimmerMartin_Deckenlampe_Sw1_V_02 + - Arbeitszimmer_Deckenlampe_Sw + - Arbeitszimmer_Deckenlampe + - Arbeitszimmer_Deckenlampe_Sw1_V_01 + - Arbeitszimmer_Deckenlampe_Sw1_V_02 groups: - - office_martin - + - office - name: Kinderzimmer Deckenlampe dimmer: True fhem_ids: - - ArbeitszimmerRebecca_Deckenlampe_Sw - - ArbeitszimmerRebecca_Deckenlampe - - ArbeitszimmerRebecca_Deckenlampe_Sw1_V_01 - - ArbeitszimmerRebecca_Deckenlampe_Sw1_V_02 + - Kinderzimmer_Deckenlampe_Sw + - Kinderzimmer_Deckenlampe + - Kinderzimmer_Deckenlampe_Sw1_V_01 + - Kinderzimmer_Deckenlampe_Sw1_V_02 groups: - - office_rebecca + - kids_room - name: Mobile Steckdosen Dimmer @@ -39,11 +38,11 @@ light: - Steckdose_Dimmer cover: -- name: Arbeitszimmer Martin Rollo +- name: Arbeitszimmer Rollo fhem_ids: - - ArbeitszimmerMartin_Rollo + - Arbeitszimmer_Rollo groups: - - office_martin + - office - name: Schlafzimmer Rollo klein @@ -60,11 +59,11 @@ cover: - bedroom -- name: Arbeitszimmer Rebecca Rollo +- name: Kinderzimmer Rollo fhem_ids: - - ArbeitszimmerRebecca_Rollo + - Kinderzimmer_Rollo groups: - - office_rebecca + - kids_room switch: @@ -84,20 +83,20 @@ switch: binary_sensor: -- name: Arbeitszimmer Martin Bewegungsmelder Batterie +- name: Arbeitszimmer Bewegungsmelder Batterie fhem_ids: - - ArbeitszimmerMartin_Bewegungsmelder + - Arbeitszimmer_Bewegungsmelder fhem_sensor_type: battery -- name: Arbeitszimmer Martin Bewegungsmelder Bewegung +- name: Arbeitszimmer Bewegungsmelder Bewegung fhem_ids: - - ArbeitszimmerMartin_Bewegungsmelder + - Arbeitszimmer_Bewegungsmelder fhem_sensor_type: motion sensor: -- name: Arbeitszimmer Martin Bewegungsmelder Helligkeit +- name: Arbeitszimmer Bewegungsmelder Helligkeit fhem_ids: - - ArbeitszimmerMartin_Bewegungsmelder + - Arbeitszimmer_Bewegungsmelder fhem_sensor_type: brightness - name: Pool Pumpe Verbrauch fhem_sensor_type: power diff --git a/config_creation/groups.yaml b/config_creation/groups.yaml index 5b9de3d..7370228 100644 --- a/config_creation/groups.yaml +++ b/config_creation/groups.yaml @@ -42,7 +42,7 @@ outside: - light.garten_spot_magnolie - light.garten_stehleuchte -office_martin: +office: name: Arbeitszimmer entities: - light.arbeitszimmer_martin_oben @@ -50,10 +50,10 @@ office_martin: - light.arbeitszimmer_martin -office_rebecca: +kids_room: name: Arbeitszimmer Rebecca entities: - - light.arbeitszimmer_rebecca + - light.kinderzimmer_fluter bathroom: diff --git a/config_creation/manual_config.yaml b/config_creation/manual_config.yaml index 8077525..ecb9717 100644 --- a/config_creation/manual_config.yaml +++ b/config_creation/manual_config.yaml @@ -19,9 +19,6 @@ updater: http: base_url: https://ha.bauer.tech -# Di over some devices automatically -#discovery: - homeassistant: name: MyHome latitude: 49.369477 @@ -30,9 +27,9 @@ homeassistant: - type: totp customize: - cover.arbeitszimmer_martin_rollo: + cover.arbeitszimmer_rollo: half_position: 16 - cover.arbeitszimmer_rebecca_rollo: + cover.kinderzimmer_rollo: half_position: 16 cover.schlafzimmer_rollo_gross: half_position: 16 @@ -112,14 +109,16 @@ notify: dimmer: cover_half: - +counter: + licht_szene_oben_counter: + initial: 0 + step: 1 switch: - platform: httpsispmctl name: esszimmer_oben_radio_steckdose host: esszimmerradio.fritz.box num_power_plugs: 4 - long_click: duration: 0.6 @@ -178,6 +177,17 @@ zwave: network_key: "0xE0, 0x64, 0x50, 0x55, 0x20, 0x63, 0xC7, 0x05, 0x62, 0xD3, 0xEA, 0x91, 0x87, 0xE0, 0x1E, 0x74" +sysdweb: +- host: kitchenpi.fritz.box + port: 10080 + username: sysdweb + password: !secret sysdweb_pw + services: + - lircd + - squeezelite + - shairport-sync + - dht22_sensing + lirc_network: - host: kitchenpi.fritz.box port: 2222 @@ -190,6 +200,7 @@ lirc_network: binary_sensor: - platform: lirc_network # sensor to show for each host if it is currently connected + - platform: sysdweb media_player: - platform: squeezebox_telnet diff --git a/config_creation/secrets.yaml b/config_creation/secrets.yaml index 0744ca5..5d6eac3 100644 --- a/config_creation/secrets.yaml +++ b/config_creation/secrets.yaml @@ -2,3 +2,4 @@ vacuum_token: 414a7741313148785a43795574706d55 watson_api_key: X_tnnoaZGOwxZlqUn07wkD2G-0vaaAuOw6I6d_6jpCf7 telegram_token: 824902906:AAHKLyNuEX_Sd_r0S-3jiZ-OPnlWnO8XSeM telegram_chatid_martin: 747324122 +sysdweb_pw: jo8ddgrUmGj7cP1mk43z \ No newline at end of file diff --git a/scenes/bad.yaml b/scenes/bad.yaml new file mode 100644 index 0000000..e16bb49 --- /dev/null +++ b/scenes/bad.yaml @@ -0,0 +1,18 @@ +- name: Bad Normal + id: bad_normal + entities: + light.bad_licht: + state: true + brightness: 150 +- name: Bad Hell + id: bad_hell + entities: + light.bad_licht: + state: true + brightness: 255 +- name: Bad Baden + id: bad_baden + entities: + light.bad_licht: + state: true + brightness: 75 \ No newline at end of file diff --git a/scenes/kinderzimmer.yaml b/scenes/kinderzimmer.yaml index 82c91a4..1e59733 100644 --- a/scenes/kinderzimmer.yaml +++ b/scenes/kinderzimmer.yaml @@ -8,4 +8,24 @@ - 0.608 - 0.371 light.kinderzimmer_deckenlampe: - state: false \ No newline at end of file + state: false +- name: Kinderzimmer Normal + id: kinderzimmer_normal + entities: + light.kinderzimmer_deckenlampe: + state: true + brightness: 114 + light.kinderzimmer_fluter: + state: true + brightness: 177 + color_temp: 417 +- name: Kinderzimmer Hell + id: kinderzimmer_hell + entities: + light.kinderzimmer_deckenlampe: + state: true + brightness: 255 + light.kinderzimmer_fluter: + state: true + brightness: 255 + color_temp: 385 \ No newline at end of file diff --git a/www/custom_ui/room-glance-card.js b/www/custom_ui/room-glance-card.js index 751bc02..e1314e3 100644 --- a/www/custom_ui/room-glance-card.js +++ b/www/custom_ui/room-glance-card.js @@ -12,7 +12,7 @@ * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -const i=new WeakMap,n=e=>"function"==typeof e&&i.has(e),r=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=(e,t,s=null)=>{for(;t!==s;){const s=t.nextSibling;e.removeChild(t),t=s}},a={},l={},c=`{{lit-${String(Math.random()).slice(2)}}}`,h=`\x3c!--${c}--\x3e`,d=new RegExp(`${c}|${h}`),p="$lit$";class u{constructor(e,t){this.parts=[],this.element=t;const s=[],i=[],n=document.createTreeWalker(t.content,133,null,!1);let r=0,o=-1,a=0;const{strings:l,values:{length:h}}=e;for(;a0;){const t=l[a],s=g.exec(t)[2],i=s.toLowerCase()+p,n=e.getAttribute(i);e.removeAttribute(i);const r=n.split(d);this.parts.push({type:"attribute",index:o,name:s,strings:r}),a+=r.length-1}}"TEMPLATE"===e.tagName&&(i.push(e),n.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(c)>=0){const i=e.parentNode,n=t.split(d),r=n.length-1;for(let t=0;t{const s=e.length-t.length;return s>=0&&e.slice(s)===t},f=e=>-1!==e.index,_=()=>document.createComment(""),g=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/; +const i=new WeakMap,n=e=>"function"==typeof e&&i.has(e),r=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=(e,t,s=null)=>{for(;t!==s;){const s=t.nextSibling;e.removeChild(t),t=s}},a={},l={},c=`{{lit-${String(Math.random()).slice(2)}}}`,d=`\x3c!--${c}--\x3e`,h=new RegExp(`${c}|${d}`),p="$lit$";class u{constructor(e,t){this.parts=[],this.element=t;const s=[],i=[],n=document.createTreeWalker(t.content,133,null,!1);let r=0,o=-1,a=0;const{strings:l,values:{length:d}}=e;for(;a0;){const t=l[a],s=g.exec(t)[2],i=s.toLowerCase()+p,n=e.getAttribute(i);e.removeAttribute(i);const r=n.split(h);this.parts.push({type:"attribute",index:o,name:s,strings:r}),a+=r.length-1}}"TEMPLATE"===e.tagName&&(i.push(e),n.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(c)>=0){const i=e.parentNode,n=t.split(h),r=n.length-1;for(let t=0;t{const s=e.length-t.length;return s>=0&&e.slice(s)===t},m=e=>-1!==e.index,_=()=>document.createComment(""),g=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -26,7 +26,7 @@ const i=new WeakMap,n=e=>"function"==typeof e&&i.has(e),r=void 0!==window.custom * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -class y{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this.options=s}update(e){let t=0;for(const s of this.__parts)void 0!==s&&s.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=r?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],s=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let n,o=0,a=0,l=i.nextNode();for(;o-1||s)&&-1===e.indexOf("--\x3e",n+1);const r=g.exec(e);t+=null===r?e+(s?c:h):e.substr(0,r.index)+r[1]+r[2]+p+r[3]+c}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}} + */class y{constructor(e,t,s,i){this.strings=e,this.values=t,this.type=s,this.processor=i}getHTML(){const e=this.strings.length-1;let t="",s=!1;for(let i=0;i-1||s)&&-1===e.indexOf("--\x3e",n+1);const r=g.exec(e);t+=null===r?e+(s?c:d):e.substr(0,r.index)+r[1]+r[2]+p+r[3]+c}return t+=this.strings[e]}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}} /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -53,7 +53,7 @@ class y{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -const S=e=>null===e||!("object"==typeof e||"function"==typeof e),b=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class w{constructor(e,t,s){this.dirty=!0,this.element=e,this.name=t,this.strings=s,this.parts=[];for(let e=0;ethis.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=a,e(this)}if(this.__pendingValue===a)return;const e=this.__pendingValue,t=this.value,s=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=null!=e&&(null==t||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=k(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=a}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const k=e=>e&&(A?{capture:e.capture,passive:e.passive,once:e.once}:e.capture); +const S=e=>null===e||!("object"==typeof e||"function"==typeof e),b=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class w{constructor(e,t,s){this.dirty=!0,this.element=e,this.name=t,this.strings=s,this.parts=[];for(let e=0;ethis.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;n(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=a,e(this)}if(this.__pendingValue===a)return;const e=this.__pendingValue,t=this.value,s=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=null!=e&&(null==t||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=k(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=a}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const k=e=>e&&(T?{capture:e.capture,passive:e.passive,once:e.once}:e.capture); /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -79,7 +79,7 @@ const S=e=>null===e||!("object"==typeof e||"function"==typeof e),b=e=>Array.isAr * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt - */function O(e){let t=$.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},$.set(e.type,t));let s=t.stringsArray.get(e.strings);if(void 0!==s)return s;const i=e.strings.join(c);return void 0===(s=t.keyString.get(i))&&(s=new u(e,e.getTemplateElement()),t.keyString.set(i,s)),t.stringsArray.set(e.strings,s),s}const $=new Map,M=new WeakMap; + */function O(e){let t=$.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},$.set(e.type,t));let s=t.stringsArray.get(e.strings);if(void 0!==s)return s;const i=e.strings.join(c);return void 0===(s=t.keyString.get(i))&&(s=new u(e,e.getTemplateElement()),t.keyString.set(i,s)),t.stringsArray.set(e.strings,s),s}const $=new Map,R=new WeakMap; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -106,7 +106,7 @@ const S=e=>null===e||!("object"==typeof e||"function"==typeof e),b=e=>Array.isAr * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.0.0");const R=(e,...t)=>new v(e,t,"html",V),j=133;function U(e,t){const{element:{content:s},parts:i}=e,n=document.createTreeWalker(s,j,null,!1);let r=z(i),o=i[r],a=-1,l=0;const c=[];let h=null;for(;n.nextNode();){a++;const e=n.currentNode;for(e.previousSibling===h&&(h=null),t.has(e)&&(c.push(e),null===h&&(h=e)),null!==h&&l++;void 0!==o&&o.index===a;)o.index=null!==h?-1:o.index-l,o=i[r=z(i,r)]}c.forEach(e=>e.parentNode.removeChild(e))}const H=e=>{let t=11===e.nodeType?0:1;const s=document.createTreeWalker(e,j,null,!1);for(;s.nextNode();)t++;return t},z=(e,t=-1)=>{for(let s=t+1;snew y(e,t,"html",V),j=133;function U(e,t){const{element:{content:s},parts:i}=e,n=document.createTreeWalker(s,j,null,!1);let r=z(i),o=i[r],a=-1,l=0;const c=[];let d=null;for(;n.nextNode();){a++;const e=n.currentNode;for(e.previousSibling===d&&(d=null),t.has(e)&&(c.push(e),null===d&&(d=e)),null!==d&&l++;void 0!==o&&o.index===a;)o.index=null!==d?-1:o.index-l,o=i[r=z(i,r)]}c.forEach(e=>e.parentNode.removeChild(e))}const H=e=>{let t=11===e.nodeType?0:1;const s=document.createTreeWalker(e,j,null,!1);for(;s.nextNode();)t++;return t},z=(e,t=-1)=>{for(let s=t+1;snull===e||!("object"==typeof e||"function"==typeof e),b=e=>Array.isAr * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -const q=(e,t)=>`${e}--${t}`;let F=!0;void 0===window.ShadyCSS?F=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),F=!1);const I=e=>t=>{const s=q(t.type,e);let i=$.get(s);void 0===i&&(i={stringsArray:new WeakMap,keyString:new Map},$.set(s,i));let n=i.stringsArray.get(t.strings);if(void 0!==n)return n;const r=t.strings.join(c);if(void 0===(n=i.keyString.get(r))){const s=t.getTemplateElement();F&&window.ShadyCSS.prepareTemplateDom(s,e),n=new u(t,s),i.keyString.set(r,n)}return i.stringsArray.set(t.strings,n),n},L=["html","svg"],B=new Set,W=(e,t,s)=>{B.add(s);const i=e.querySelectorAll("style"),{length:n}=i;if(0===n)return void window.ShadyCSS.prepareTemplateStyles(t.element,s);const r=document.createElement("style");for(let e=0;e{L.forEach(t=>{const s=$.get(q(t,e));void 0!==s&&s.keyString.forEach(e=>{const{element:{content:t}}=e,s=new Set;Array.from(t.querySelectorAll("style")).forEach(e=>{s.add(e)}),U(e,s)})})})(s);const o=t.element.content;!function(e,t,s=null){const{element:{content:i},parts:n}=e;if(null==s)return void i.appendChild(t);const r=document.createTreeWalker(i,j,null,!1);let o=z(n),a=0,l=-1;for(;r.nextNode();)for(l++,r.currentNode===s&&(a=H(t),s.parentNode.insertBefore(t,s));-1!==o&&n[o].index===l;){if(a>0){for(;-1!==o;)n[o].index+=a,o=z(n,o);return}o=z(n,o)}}(t,r,o.firstChild),window.ShadyCSS.prepareTemplateStyles(t.element,s);const a=o.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==a)e.insertBefore(a.cloneNode(!0),e.firstChild);else{o.insertBefore(r,o.firstChild);const e=new Set;e.add(r),U(t,e)}}; +const q=(e,t)=>`${e}--${t}`;let F=!0;void 0===window.ShadyCSS?F=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),F=!1);const L=e=>t=>{const s=q(t.type,e);let i=$.get(s);void 0===i&&(i={stringsArray:new WeakMap,keyString:new Map},$.set(s,i));let n=i.stringsArray.get(t.strings);if(void 0!==n)return n;const r=t.strings.join(c);if(void 0===(n=i.keyString.get(r))){const s=t.getTemplateElement();F&&window.ShadyCSS.prepareTemplateDom(s,e),n=new u(t,s),i.keyString.set(r,n)}return i.stringsArray.set(t.strings,n),n},I=["html","svg"],B=new Set,W=(e,t,s)=>{B.add(s);const i=e.querySelectorAll("style"),{length:n}=i;if(0===n)return void window.ShadyCSS.prepareTemplateStyles(t.element,s);const r=document.createElement("style");for(let e=0;e{I.forEach(t=>{const s=$.get(q(t,e));void 0!==s&&s.keyString.forEach(e=>{const{element:{content:t}}=e,s=new Set;Array.from(t.querySelectorAll("style")).forEach(e=>{s.add(e)}),U(e,s)})})})(s);const o=t.element.content;!function(e,t,s=null){const{element:{content:i},parts:n}=e;if(null==s)return void i.appendChild(t);const r=document.createTreeWalker(i,j,null,!1);let o=z(n),a=0,l=-1;for(;r.nextNode();)for(l++,r.currentNode===s&&(a=H(t),s.parentNode.insertBefore(t,s));-1!==o&&n[o].index===l;){if(a>0){for(;-1!==o;)n[o].index+=a,o=z(n,o);return}o=z(n,o)}}(t,r,o.firstChild),window.ShadyCSS.prepareTemplateStyles(t.element,s);const a=o.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==a)e.insertBefore(a.cloneNode(!0),e.firstChild);else{o.insertBefore(r,o.firstChild);const e=new Set;e.add(r),U(t,e)}}; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. @@ -162,74 +162,76 @@ const se=(e,t)=>"method"!==t.kind||!t.descriptor||"value"in t.descriptor?{kind:" * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -(window.litElementVersions||(window.litElementVersions=[])).push("2.2.0");const ce=e=>e.flat?e.flat(1/0):function e(t,s=[]){for(let i=0,n=t.length;i(e.add(t),e),new Set).forEach(e=>t.unshift(e))}else e&&t.push(e);return t}initialize(){super.initialize(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?re?this.renderRoot.adoptedStyleSheets=e.map(e=>e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){super.update(e);const t=this.render();t instanceof v&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){}}he.finalized=!0,he.render=(e,t,s)=>{const i=s.scopeName,n=M.has(t),r=F&&11===t.nodeType&&!!t.host&&e instanceof v,a=r&&!B.has(i),l=a?document.createDocumentFragment():t;if(((e,t,s)=>{let i=M.get(t);void 0===i&&(o(t,t.firstChild),M.set(t,i=new P(Object.assign({templateFactory:O},s))),i.appendInto(t)),i.setValue(e),i.commit()})(e,l,Object.assign({templateFactory:I(i)},s)),a){const e=M.get(l);M.delete(l),e.value instanceof y&&W(l,e.value.template,i),o(t,t.firstChild),t.appendChild(l),M.set(t,e)}!n&&r&&window.ShadyCSS.styleElement(t.host)}; -/** - * @license - * Copyright (c) 2018 The Polymer Project Authors. All rights reserved. - * This code may only be used under the BSD style license found at - * http://polymer.github.io/LICENSE.txt - * The complete set of authors may be found at - * http://polymer.github.io/AUTHORS.txt - * The complete set of contributors may be found at - * http://polymer.github.io/CONTRIBUTORS.txt - * Code distributed by Google as part of the polymer project is also - * subject to an additional IP rights grant found at - * http://polymer.github.io/PATENTS.txt - */ -const de=new WeakMap,pe=(e=>(...t)=>{const s=e(...t);return i.set(s,!0),s})(e=>t=>{if(!(t instanceof x)||t instanceof T||"class"!==t.committer.name||t.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:s}=t,{element:i}=s;de.has(t)||(i.className=s.strings.join(" "));const{classList:n}=i,r=de.get(t);for(const t in r)t in e||n.remove(t);for(const t in e){const s=e[t];if(!r||s!==r[t]){n[s?"add":"remove"](t)}}de.set(t,e)});s.d(t,"RoomGlanceCard",function(){return me});var ue=function(e,t,s,i){var n,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,s,o):n(t,s))||o);return r>3&&o&&Object.defineProperty(t,s,o),o};let me=class extends he{setConfig(e){console.log("Setting config",e),this._config=e}static getCardSize(){return 3}render(){return R` - - - -
-
${this._config.name}
-
- ${this.renderCoverControl()} -
-
- -
-
-
- ${this._config.scenes.map(e=>this.renderSceneButton(e))} +(window.litElementVersions||(window.litElementVersions=[])).push("2.2.0");const ce=e=>e.flat?e.flat(1/0):function e(t,s=[]){for(let i=0,n=t.length;i(e.add(t),e),new Set).forEach(e=>t.unshift(e))}else e&&t.push(e);return t}initialize(){super.initialize(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?re?this.renderRoot.adoptedStyleSheets=e.map(e=>e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){super.update(e);const t=this.render();t instanceof y&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){}}de.finalized=!0,de.render=(e,t,s)=>{const i=s.scopeName,n=R.has(t),r=F&&11===t.nodeType&&!!t.host&&e instanceof y,a=r&&!B.has(i),l=a?document.createDocumentFragment():t;if(((e,t,s)=>{let i=R.get(t);void 0===i&&(o(t,t.firstChild),R.set(t,i=new P(Object.assign({templateFactory:O},s))),i.appendInto(t)),i.setValue(e),i.commit()})(e,l,Object.assign({templateFactory:L(i)},s)),a){const e=R.get(l);R.delete(l),e.value instanceof v&&W(l,e.value.template,i),o(t,t.firstChild),t.appendChild(l),R.set(t,e)}!n&&r&&window.ShadyCSS.styleElement(t.host)},s.d(t,"RoomGlanceCard",function(){return pe});var he=function(e,t,s,i){var n,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,s,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(r<3?n(o):r>3?n(t,s,o):n(t,s))||o);return r>3&&o&&Object.defineProperty(t,s,o),o};let pe=class extends de{setConfig(e){console.log("Setting config",e),this._config=e}static getCardSize(){return 3}render(){return this._config.scenes.length>=5?M` + + - - - - -
-
- - - -
- `}renderSceneButton(e){return R` +
+
${this._config.name}
+
+ ${this.renderCoverControl()} +
+
+ +
+
+
${this.renderLightControl()}
+
+ +
+
+
+ ${this._config.scenes.map(e=>this.renderSceneButton(e))} +
+
+ + + `:M` + + + +
+
+
${this._config.name}
+
+ ${this.renderCoverControl()} +
+
+ +
+
+
+ ${this._config.scenes.map(e=>this.renderSceneButton(e))} + ${this.renderLightControl()} +
+
+ +
+ `}renderSceneButton(e){return M` - `}renderCoverControl(){return R` + `}renderLightControl(){return M` + + + `}renderCoverControl(){return M` + @@ -252,7 +254,7 @@ const de=new WeakMap,pe=(e=>(...t)=>{const s=e(...t);return i.set(s,!0),s})(e=>t overflow: hidden; } - hui-image.clickable { + my-image.clickable { cursor: pointer; } @@ -266,7 +268,8 @@ const de=new WeakMap,pe=(e=>(...t)=>{const s=e(...t);return i.set(s,!0),s})(e=>t position: absolute; left: 0; right: 0; - + bottom: 0; + padding-left: 8px; padding-right: 8px; @@ -274,14 +277,22 @@ const de=new WeakMap,pe=(e=>(...t)=>{const s=e(...t);return i.set(s,!0),s})(e=>t line-height: 40px; color: white; display: flex; + flex-direction: row; justify-content: space-between; background-color: rgba(0, 0, 0, 0.3); } + + .box-top { + bottom: 90px; + height:45px; + padding-top: 0px; + padding-bottom: 0; + } .box-upper { - bottom: 45px; - padding-top: 4px; + height:45px; + padding-top: 0px; padding-bottom: 0; } .box-lower { @@ -305,4 +316,4 @@ const de=new WeakMap,pe=(e=>(...t)=>{const s=e(...t);return i.set(s,!0),s})(e=>t ha-icon.state-on { color: white; } - `}};ue([ne()],me.prototype,"hass",void 0),ue([ne()],me.prototype,"_config",void 0),me=ue([(e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:s,elements:i}=t;return{kind:s,elements:i,finisher(t){window.customElements.define(e,t)}}})(e,t))("room-glance-card")],me)}]); \ No newline at end of file + `}};he([ne()],pe.prototype,"hass",void 0),he([ne()],pe.prototype,"_config",void 0),pe=he([(e=>t=>"function"==typeof t?((e,t)=>(window.customElements.define(e,t),t))(e,t):((e,t)=>{const{kind:s,elements:i}=t;return{kind:s,elements:i,finisher(t){window.customElements.define(e,t)}}})(e,t))("room-glance-card")],pe)}]); \ No newline at end of file diff --git a/www/custom_ui/state-card-custom-cover.js b/www/custom_ui/state-card-custom-cover.js index 2a99712..24bb905 100644 --- a/www/custom_ui/state-card-custom-cover.js +++ b/www/custom_ui/state-card-custom-cover.js @@ -12,7 +12,7 @@ * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -const i=new WeakMap,n=t=>"function"==typeof t&&i.has(t),r=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=(t,e,s=null)=>{for(;e!==s;){const s=e.nextSibling;t.removeChild(e),e=s}},a={},l={},c=`{{lit-${String(Math.random()).slice(2)}}}`,h=`\x3c!--${c}--\x3e`,p=new RegExp(`${c}|${h}`),u="$lit$";class d{constructor(t,e){this.parts=[],this.element=e;const s=[],i=[],n=document.createTreeWalker(e.content,133,null,!1);let r=0,o=-1,a=0;const{strings:l,values:{length:h}}=t;for(;a0;){const e=l[a],s=y.exec(e)[2],i=s.toLowerCase()+u,n=t.getAttribute(i);t.removeAttribute(i);const r=n.split(p);this.parts.push({type:"attribute",index:o,name:s,strings:r}),a+=r.length-1}}"TEMPLATE"===t.tagName&&(i.push(t),n.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(c)>=0){const i=t.parentNode,n=e.split(p),r=n.length-1;for(let e=0;e{const s=t.length-e.length;return s>=0&&t.slice(s)===e},f=t=>-1!==t.index,m=()=>document.createComment(""),y=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=\/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/; +const i=new WeakMap,n=t=>"function"==typeof t&&i.has(t),r=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=(t,e,s=null)=>{for(;e!==s;){const s=e.nextSibling;t.removeChild(e),e=s}},a={},l={},c=`{{lit-${String(Math.random()).slice(2)}}}`,h=`\x3c!--${c}--\x3e`,p=new RegExp(`${c}|${h}`),u="$lit$";class d{constructor(t,e){this.parts=[],this.element=e;const s=[],i=[],n=document.createTreeWalker(e.content,133,null,!1);let r=0,o=-1,a=0;const{strings:l,values:{length:h}}=t;for(;a0;){const e=l[a],s=y.exec(e)[2],i=s.toLowerCase()+u,n=t.getAttribute(i);t.removeAttribute(i);const r=n.split(p);this.parts.push({type:"attribute",index:o,name:s,strings:r}),a+=r.length-1}}"TEMPLATE"===t.tagName&&(i.push(t),n.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(c)>=0){const i=t.parentNode,n=e.split(p),r=n.length-1;for(let e=0;e{const s=t.length-e.length;return s>=0&&t.slice(s)===e},f=t=>-1!==t.index,m=()=>document.createComment(""),y=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/; /** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.