vuko | deeeff8 | 2022-10-02 23:12:29 +0200 | [diff] [blame] | 1 | { |
| 2 | default_config = {}; |
| 3 | |
| 4 | homeassistant = { |
| 5 | auth_providers = [ |
| 6 | { |
| 7 | type = "homeassistant"; |
| 8 | } |
| 9 | { |
| 10 | type = "trusted_networks"; |
| 11 | trusted_networks = ["127.0.0.1" "::1" "10.0.0.0/8" "fd00::/8"]; |
| 12 | allow_bypass_login = true; |
| 13 | } |
| 14 | ]; |
| 15 | customize = { |
| 16 | "light.left_par_brightness" = {hidden = true;}; |
| 17 | "light.right_par_brightness" = {hidden = true;}; |
| 18 | "switch.portable_spejsiot_node_b4a90f" = {icon = "mdi:power-plug";}; |
| 19 | "switch.projection_screen" = {icon = "mdi:projector-screen";}; |
| 20 | "switch.projector" = {icon = "mdi:projector";}; |
| 21 | "switch.samsung_tv_mute" = {icon = "mdi:volume-off";}; |
| 22 | "switch.samsung_tv_telelele" = {icon = "mdi:monitor";}; |
| 23 | "switch.space_heater" = {icon = "mdi:fire";}; |
| 24 | }; |
| 25 | customize_glob = {"media_player.m*" = {custom_ui_state_card = "state-card-mini-media-player";};}; |
| 26 | elevation = "106"; |
| 27 | latitude = "52.25"; |
| 28 | longitude = "21"; |
| 29 | name = "Warsaw Hackerspace"; |
| 30 | time_zone = "Europe/Warsaw"; |
| 31 | unit_system = "metric"; |
| 32 | }; |
| 33 | |
| 34 | http = { |
| 35 | use_x_forwarded_for = true; |
| 36 | trusted_proxies = [ "127.0.0.1" "::1" ]; |
| 37 | }; |
| 38 | |
| 39 | automation = [ |
| 40 | { |
| 41 | action = { |
| 42 | data_template = { |
| 43 | payload = "{{ states('input_number.polycom_hdmi_gain') }}"; |
| 44 | retain = true; |
| 45 | topic = "iot/polycom/hdmi:main/gain/set"; |
| 46 | }; |
| 47 | service = "mqtt.publish"; |
| 48 | }; |
| 49 | hide_entity = true; |
| 50 | trigger = { |
| 51 | entity_id = "input_number.polycom_hdmi_gain"; |
| 52 | platform = "state"; |
| 53 | }; |
| 54 | } |
| 55 | { |
| 56 | action = { |
| 57 | data_template = { |
| 58 | payload = "{{ states('input_number.polycom_aux1_gain') }}"; |
| 59 | retain = true; |
| 60 | topic = "iot/polycom/aux1:main/gain/set"; |
| 61 | }; |
| 62 | service = "mqtt.publish"; |
| 63 | }; |
| 64 | hide_entity = true; |
| 65 | trigger = { |
| 66 | entity_id = "input_number.polycom_aux1_gain"; |
| 67 | platform = "state"; |
| 68 | }; |
| 69 | } |
| 70 | { |
| 71 | action = { |
| 72 | data_template = { |
| 73 | payload = "{{ states.input_select.hdmi_source_a.attributes['options'].index(states('input_select.hdmi_source_a')) }}"; |
| 74 | retain = true; |
| 75 | topic = "iot/3c189c/matrix/sourceA/set"; |
| 76 | }; |
| 77 | service = "mqtt.publish"; |
| 78 | }; |
| 79 | hide_entity = true; |
| 80 | trigger = { |
| 81 | entity_id = "input_select.hdmi_source_a"; |
| 82 | platform = "state"; |
| 83 | }; |
| 84 | } |
| 85 | { |
| 86 | action = { |
| 87 | data_template = { |
| 88 | payload = "{{ states.input_select.hdmi_source_b.attributes['options'].index(states('input_select.hdmi_source_b')) }}"; |
| 89 | retain = true; |
| 90 | topic = "iot/3c189c/matrix/sourceB/set"; |
| 91 | }; |
| 92 | service = "mqtt.publish"; |
| 93 | }; |
| 94 | hide_entity = true; |
| 95 | trigger = { |
| 96 | entity_id = "input_select.hdmi_source_b"; |
| 97 | platform = "state"; |
| 98 | }; |
| 99 | } |
| 100 | { |
| 101 | action = { |
| 102 | data = { |
| 103 | entity_id = "input_select.hdmi_source_b"; |
| 104 | option = "Input 1 / Kolumna"; |
| 105 | }; |
| 106 | service = "input_select.select_option"; |
| 107 | }; |
| 108 | alias = "Switch projector on HDMI1 connect"; |
| 109 | trigger = { |
| 110 | payload = "true"; |
| 111 | platform = "mqtt"; |
| 112 | topic = "iot/3c189c/matrix/rx1_online"; |
| 113 | }; |
| 114 | } |
| 115 | { |
| 116 | action = { |
| 117 | data = { |
| 118 | entity_id = "input_select.hdmi_source_b"; |
| 119 | option = "Chromecast"; |
| 120 | }; |
| 121 | service = "input_select.select_option"; |
| 122 | }; |
| 123 | alias = "Switch projector on HDMI1 disconnect"; |
| 124 | trigger = { |
| 125 | payload = "false"; |
| 126 | platform = "mqtt"; |
| 127 | topic = "iot/3c189c/matrix/rx1_online"; |
| 128 | }; |
| 129 | } |
| 130 | { |
| 131 | action = { |
| 132 | data_template = { |
| 133 | payload = "{{ states('input_number.heater_fan_speed') }}"; |
| 134 | retain = true; |
| 135 | topic = "iot/ab20d2/heater/fan/set"; |
| 136 | }; |
| 137 | service = "mqtt.publish"; |
| 138 | }; |
| 139 | hide_entity = true; |
| 140 | trigger = { |
| 141 | entity_id = "input_number.heater_fan_speed"; |
| 142 | platform = "state"; |
| 143 | }; |
| 144 | } |
| 145 | ]; |
| 146 | |
vuko | 4fe6e02 | 2022-12-19 23:55:31 +0100 | [diff] [blame] | 147 | # cast has been removed |
| 148 | # TODO check how this needs to be replaced |
| 149 | #cast = {media_player = [{host = "10.8.1.44";}];}; |
vuko | deeeff8 | 2022-10-02 23:12:29 +0200 | [diff] [blame] | 150 | |
| 151 | # TODO fix and enable |
| 152 | #frontend = { |
| 153 | # extra_html_url = ["/local/custom_ui/state-card-mini-media-player.html"]; |
| 154 | # extra_html_url_es5 = ["/local/custom_ui/state-card-mini-media-player_es5.html"]; |
| 155 | #}; |
| 156 | |
| 157 | group = { |
| 158 | av = { |
| 159 | control = "hidden"; |
| 160 | entities = ["switch.projector" "switch.projection_screen" "input_select.hdmi_source_a" "input_number.polycom_hdmi_gain" "switch.samsung_tv_telelele" "switch.samsung_tv_mute" "input_select.hdmi_source_b" "input_number.polycom_aux1_gain" "switch.aux1_gain_mic" "media_player.mpd"]; |
| 161 | name = "HackAV"; |
| 162 | }; |
| 163 | heater = { |
| 164 | control = "hidden"; |
vuko | 4fe6e02 | 2022-12-19 23:55:31 +0100 | [diff] [blame] | 165 | entities = ["switch.space_heater" "input_number.heater_fan_speed" "fan.exhaust"]; |
| 166 | name = "HVAC"; |
vuko | deeeff8 | 2022-10-02 23:12:29 +0200 | [diff] [blame] | 167 | }; |
| 168 | }; |
| 169 | input_number = { |
| 170 | heater_fan_speed = { |
| 171 | max = 100; |
| 172 | min = 0; |
vuko | 4fe6e02 | 2022-12-19 23:55:31 +0100 | [diff] [blame] | 173 | name = "Heater airflow"; |
vuko | deeeff8 | 2022-10-02 23:12:29 +0200 | [diff] [blame] | 174 | step = 1; |
| 175 | }; |
| 176 | polycom_aux1_gain = { |
| 177 | max = 10; |
| 178 | min = -40; |
| 179 | name = "AUX1 Audio Gain"; |
| 180 | step = 1; |
| 181 | }; |
| 182 | polycom_hdmi_gain = { |
| 183 | max = 0; |
| 184 | min = -40; |
| 185 | name = "HDMI Audio Gain"; |
| 186 | step = 1; |
| 187 | }; |
| 188 | }; |
| 189 | input_select = { |
| 190 | hdmi_source_b = { |
| 191 | name = "Projector HDMI Source (Conn A/TX1)"; |
| 192 | options = ["PS3" "Input 1 / Kolumna" "Unused" "Chromecast"]; |
| 193 | }; |
| 194 | }; |
| 195 | |
| 196 | media_player = [ |
| 197 | { |
| 198 | host = "10.8.1.16"; |
| 199 | platform = "mpd"; |
| 200 | } |
| 201 | ]; |
| 202 | |
| 203 | mqtt = { |
| 204 | light = [ |
| 205 | { |
| 206 | command_topic = "iot/077521/relay/on/set"; |
| 207 | name = "Main room"; |
vuko | 4fe6e02 | 2022-12-19 23:55:31 +0100 | [diff] [blame] | 208 | object_id = "main_room"; |
vuko | deeeff8 | 2022-10-02 23:12:29 +0200 | [diff] [blame] | 209 | payload_off = "false"; |
| 210 | payload_on = "true"; |
| 211 | retain = true; |
| 212 | state_topic = "iot/077521/relay/on"; |
| 213 | } |
| 214 | ]; |
| 215 | fan = [ |
| 216 | { |
| 217 | command_topic = "iot/c0dbe7/relay/on/set"; |
vuko | 4fe6e02 | 2022-12-19 23:55:31 +0100 | [diff] [blame] | 218 | name = "Exhaust"; |
| 219 | object_id = "exhaust"; |
vuko | deeeff8 | 2022-10-02 23:12:29 +0200 | [diff] [blame] | 220 | payload_off = "false"; |
| 221 | payload_on = "true"; |
| 222 | retain = true; |
| 223 | state_topic = "iot/c0dbe7/relay/on"; |
| 224 | } |
| 225 | ]; |
| 226 | sensor = [ |
| 227 | { |
| 228 | name = "DCR01 Temperature"; |
| 229 | qos = 0; |
| 230 | state_topic = "iot/3394f5/environment/degree"; |
| 231 | unit_of_measurement = "ÂșC"; |
| 232 | } |
| 233 | { |
| 234 | name = "DCR01 Humidity"; |
| 235 | qos = 0; |
| 236 | state_topic = "iot/3394f5/environment/humidity"; |
| 237 | unit_of_measurement = "%"; |
| 238 | } |
| 239 | ]; |
| 240 | switch = [ |
| 241 | { |
| 242 | command_topic = "iot/b4a90f/relay/on/set"; |
| 243 | name = "Portable SpejsIoT node (b4a90f)"; |
| 244 | payload_off = "false"; |
| 245 | payload_on = "true"; |
| 246 | retain = true; |
| 247 | state_topic = "iot/b4a90f/relay/on"; |
| 248 | } |
| 249 | { |
| 250 | command_topic = "iot/d106e1/screen/down/set"; |
| 251 | name = "Projection screen"; |
| 252 | payload_off = "false"; |
| 253 | payload_on = "true"; |
| 254 | retain = true; |
| 255 | state_topic = "iot/d106e1/screen/down"; |
| 256 | } |
| 257 | { |
| 258 | command_topic = "iot/craptrap/windows10/state/set"; |
| 259 | name = "Windows 10 VM (Craptrap)"; |
Serge Bazanski | aafef33 | 2023-09-25 02:01:28 +0200 | [diff] [blame] | 260 | payload_off = "shutdown"; |
vuko | deeeff8 | 2022-10-02 23:12:29 +0200 | [diff] [blame] | 261 | payload_on = "running"; |
| 262 | state_topic = "iot/craptrap/windows10/state"; |
| 263 | } |
| 264 | { |
Serge Bazanski | aafef33 | 2023-09-25 02:01:28 +0200 | [diff] [blame] | 265 | command_topic = "iot/craptrap/blitzloop/state/set"; |
| 266 | name = "Blitzloop VM (Craptrap)"; |
| 267 | payload_off = "shutdown"; |
| 268 | payload_on = "running"; |
| 269 | state_topic = "iot/craptrap/blitzloop/state"; |
| 270 | } |
| 271 | { |
vuko | deeeff8 | 2022-10-02 23:12:29 +0200 | [diff] [blame] | 272 | command_topic = "iot/ab20d2/heater/on/set"; |
vuko | 4fe6e02 | 2022-12-19 23:55:31 +0100 | [diff] [blame] | 273 | name = "Heater power"; |
| 274 | object_id = "space_heater"; |
vuko | deeeff8 | 2022-10-02 23:12:29 +0200 | [diff] [blame] | 275 | payload_off = "false"; |
| 276 | payload_on = "true"; |
| 277 | retain = true; |
| 278 | state_topic = "iot/ab20d2/heater/on"; |
| 279 | } |
| 280 | ]; |
| 281 | }; |
| 282 | |
| 283 | scene = [ |
| 284 | { |
| 285 | entities = { |
| 286 | "light.main_room" = false; |
| 287 | "switch.projection_screen" = true; |
| 288 | "switch.projector" = true; |
| 289 | }; |
| 290 | name = "Cinema"; |
| 291 | } |
| 292 | { |
| 293 | entities = { |
Serge Bazanski | aafef33 | 2023-09-25 02:01:28 +0200 | [diff] [blame] | 294 | "light.main_room" = false; |
| 295 | "switch.projection_screen" = true; |
| 296 | "switch.projector" = true; |
| 297 | "switch.blitzloop_vm_craptrap" = true; |
| 298 | }; |
| 299 | name = "Karaoke"; |
| 300 | } |
| 301 | { |
| 302 | entities = { |
vuko | deeeff8 | 2022-10-02 23:12:29 +0200 | [diff] [blame] | 303 | "light.main_room" = true; |
| 304 | "switch.projection_screen" = false; |
| 305 | "switch.projector" = false; |
| 306 | }; |
| 307 | name = "Standard"; |
| 308 | } |
| 309 | ]; |
| 310 | } |