So here we go with my cards again and also the code for it:
Be aware I am using using the following:
-Lights: Broadlink TC2 switch (RF switches, no neutral wire required). Managed by Broadlink IR component.
-Fan: Broadlink TC2 switch (RF switch, no neutral wire required), just turn on and off from the switch itself because if I go the IR route to control the fan/speed and if the switch is off, obviously it won’t turn on. (Managed by Broadlink IR component).
-AC: Broadlink IR component switch IR codes to turn on and off. The AC is a wall split AC, it is the dumbest AC you could probably get, so it has the same IR code to turn on/off and then different IR codes for every thermostat/mode combination. I solved this by putting a door sensor which updates instantly whether the AC is on or off, so far it’s 100% accurate, my automations to turn it on and off automatically based on motion/home presence are great.
-AC thermostat: well obviously the component of this thread, just passing the IR codes for the thermostat/mode. No turn on or off here.
-Lumen/Lux sensor: Xiaomi Aqara Motion sensor which has motion, lumen, lux.
-Temperature sensor: Xiaomi bluetooth temperature LCD sensor which gives me temperature and humidity readings (for the living room), for the bedroom I am using the Broadlink IR integrated temperature sensor. There’s also very small ones without the screen which provide extra additional readings (barometers or who knows what).
-The lamps are the Xiaomi Gateway in my Living Room which only turns itself at night when it’s dark (because it has an illumination sensor) and while there’s movement. For my bedroom it is a standing lamp, which is controlled by a TP-Link plug.
For the media players, it’s a Xiaomi Mi Box and some Google Home minis, I use the Chromecast control integration. I use this custom card:
Also you will require this card for the vertical stack-in card:
I probably went for the cheapest stuff and it works great along with a Raspberry Pi 3B+ with tons of stuff running on it.
Almost every single item is less than 25 bucks.
Broadlink TC2 switches(2 and 3 gangs): ~25 USD
Xiaomi Bluetooth temperature sensor: ~12 USD
Door sensors: ~8 USD
Xiaomi Aqara Motion Sensor: ~12 USD
Dlink smart plug: ~10USD
Broadlink IR remote: ~25USD
Inconvenience is that since I’ve got a dumb ACs and I am renting then I need multiple Broadlink IR remotes but I can also load balance them so each one controls the lights (RF) of the room they’re in instead of giving all the work to a single Broadlink IR remote.
I am a renter so no hardcore stuff, just replacing the light switches which is pretty easy.
Lovelace UI YAML
- type: vertical-stack
cards:
- type: custom:vertical-stack-in-card
title: Bedroom
cards:
- type: glance
title: Lights
entities:
- entity: switch.bedroomlight
tap_action: toggle
hold_action: more-info
- entity: switch.bedroomlamp
tap_action: toggle
hold_action: more-info
- type: glance
title: Climate Control
entities:
- entity: switch.bedroomfan
tap_action: toggle
hold_action: more-info
- entity: input_boolean.fanautobr
tap_action: toggle
hold_action: more-info
name: 'Auto'
- entity: switch.bedroomairconditioner
tap_action: toggle
hold_action: more-info
- entity: input_boolean.acautobr
tap_action: toggle
hold_action: more-info
name: 'Auto'
- type: thermostat
entity: climate.bedroom_air_conditioner
- type: glance
entities:
- sensor.illumination_158d0001e5cc4e
- sensor.broadlink_sensor_temperature
- type: custom:mini-media-player
entity: media_player.bedroom_speaker_3_2
artwork: cover
show_source: true
show_progress: true
show_shuffle: true
- type: glance
title: Lights
entities:
- entity: switch.couchlight
tap_action: toggle
hold_action: more-info
- entity: switch.tablelight
tap_action: toggle
hold_action: more-info
- entity: switch.kitchenlight
tap_action: toggle
hold_action: more-info
- entity: light.gateway_light_7811dcdef518
tap_action: toggle
hold_action: more-info
name: 'Lamp'
- type: glance
title: Climate Control
entities:
- entity: switch.livingroomfan
tap_action: toggle
hold_action: more-info
- entity: input_boolean.fanautolr
tap_action: toggle
hold_action: more-info
name: 'Auto'
- entity: switch.livingroomairconditioner
tap_action: toggle
hold_action: more-info
- entity: input_boolean.acautolr
tap_action: toggle
hold_action: more-info
name: 'Auto'
- type: thermostat
entity: climate.living_room_air_conditioner
- type: glance
entities:
- sensor.illumination_158d0001e0acf6
- sensor.illumination_7811dcdef518
- sensor.living_room_temperatura
- sensor.living_room_umidita
- type: custom:mini-media-player
entity: media_player.living_room_speaker_3
artwork: cover
show_source: true
show_progress: true
show_shuffle: true