My Lounge Setup mite give other user Ideas

Just want to show off 1 room of my house that home assistant has Control of…

TV panasonic 65"

image

1= broadlink
2= IR repeater (going into cabinet

image

kick board slides out hiding all the cabling

how I get all my IR codes into home assistant

wemos with a IR shield on it with Tasmota on it

https://wiki.wemos.cc/products:d1_mini_shields:ir_controller_shield

my IR gas heater

one of many 433 switch talking to sonoff RF with tasmota on it

with the bluetooth sensor also have one in lounge hall master bedroom and bath room.

image

thanks to Intermit.tech

gas heat is control by the

  - platform: broadlink
    host: bla.bla.bla.bla
    mac: 'bla.bla.bla.bla'
    timeout: 15
    switches:
      gas_heater:
        friendly_name: "Gas Heater"
        command_on: 'JgBIAAABK5MVEBQ2FRAVERQRGQwUERQ2FRAVNhQ2FRAVEBkyFTUUERURFDYUERQRFDYUERURFDYUNhQRFTYUNhQRFDYVMBgTFAANBQ=='
        command_off: 'JgBIAAABKZUSExI3ExMSExIUEhMSExI4EhMSORI4EhMSExI5EjgSExI4EhAWOBI4EhMSExIUEjgSExI4EhMSFBI4EjgSORITEgANBQ=='
      gas_control:
        friendly_name: "Gas Control"
        command_on: 'JgBIAAABKpQTExI4EhQRFBETExMSExI4EhQROBM3ExMSExE5EzcTExM3EhQRFBI4EhMSExIUETkSEhM3EzgSExM3EzcWNRIUEgANBQ=='
        command_off: 'JgBIAAABKY8ZEhM3ExMSExEUEhMTEhM3ExMSOBI4ExISExM4EjgTEhITEzgSOBMSExITEhMTEjgSOBMSExITOBI4EzcTNhQTEgANBQ=='

gas control on is GAS UP on the ir remote
gas control off is GAS down on the ir remote

now joining all the bits

the 433 switch on the gas heater is the manual switch to turn on the lounge climate control.

#=======================================================================
# 
#=======================================================================
- id: Gas Heater Toggle
  alias: Gas Heater Toggle
  initial_state: 'on'
  trigger:
  - entity_id: sensor.last_rf
    platform: state
    to: '112694'
  condition: []
  action:
  - data:
      entity_id: switch.gas_heater
    service_template: >
      {%- if (states.switch.gas_heater.state == 'off') -%}
        switch.turn_on
      {%- else -%}
        switch.turn_off
      {%- endif -%} 
  - data:
      entity_id: climate.gas_heater , climate.hall_heater
    service_template: >
      {%- if (states.switch.gas_heater.state == 'on') -%}
        climate.turn_on
      {%- else -%}
        climate.turn_off
      {%- endif -%} 

have this

template:

  - platform: template
    sensors:
      garage_car_present:
        value_template: > 
         {% set Car = states('sensor.car_spot_1')|int(1000) %}
         {% if (Car<200) %}
         Home
         {% else %}
         Away
         {% endif %}
      gasheater:
        value_template: >-
          {% if is_state("sensor.day_night", "Night")  and is_state('media_player.mckillentv', 'on') and
              is_state('switch.lava_lamp', 'on')  and is_state('sensor.am_pm', 'PM') %}
          on
          {% else %}
          off
          {% endif %}

for gas heater to turn on automatly
must be Night and TV on and Lava Lamp ON

- id: Gas Heater ON If TV ON
  alias: Gas Heater ON If TV ON
  trigger:
  - entity_id: sensor.gasheater
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      entity_id: climate.gas_heater
    service: climate.turn_on
  - data:
      entity_id: climate.hall_heater
    service: climate.turn_on
  - data:
      entity_id: climate.gas_heater
      temperature: '22'
    service: climate.set_temperature

the lovelace look
image

now the Ir remote

I Have this sensor

#=======================================================================
#
#=======================================================================
  - platform: mqtt
    name: "Last IR"
    state_topic: "tele/IR/RESULT"
    value_template: '{{value_json.IrReceived.Data}}'
    expire_after: 1
    qos: 1

after 1 sec the sensor goes back to unknown (great to toggling a light )

so pressing the pause on the remote

- id: Kodi Pause
  alias: Kodi Pause
  trigger:
  - entity_id: sensor.last_ir
    platform: state
    to: '1908312'
  condition: []
  action:
  - data_template:
      entity_id: media_player.{{ states.input_select.kodi_machine.state}}
    service: media_player.media_play_pause

kodi pause/play

red button press

- id: RED IR
  alias: RED IR
  trigger:
  - entity_id: sensor.ir_codes
    platform: state
    to: RED
  condition: []
  action:
  - data:
      entity_id: light.kitchen
    service: light.toggle
  - data:
      payload: IR-RED
      topic: IR/CODES
    service: mqtt.publish

as I have a SKY the CH does nothing
well it now ups the gas heater up/down

- id: CH DIM DOWN
  alias: CH DIM DOWN
  trigger:
  - entity_id: sensor.ir_codes
    platform: state
    to: DOWN
  action:
  - data:
      payload: IR-DIM DOWN
      topic: IR/CODES
    service: mqtt.publish
  - service: script.turn_on
    entity_id: script.gas_down
- id: CH DIM UP
  alias: CH DIM UP
  trigger:
  - entity_id: sensor.ir_codes
    platform: state
    to: UP
  action:
  - data:
      payload: IR-DIM UP
      topic: IR/CODES
    service: mqtt.publish
  - service: script.turn_on
    entity_id: script.gas_up

I have dyslexia writting this is heaps hard and than writting some yaml script automation code

see clear as mud
hope it make cents.

11 Likes

Nice project and well documented!

thanks bro

1 Like

Thanks heaps for putting all of that together for me @myle!

all good bro

Nice! I love using my TV remote to mess with people haha
We have the same RF buttons too, I keep them on my kitchen table to have simple controls from the dinner table :slight_smile: and a set in my car to bypass the garage doors rolling code with a cheep tasmote’d garage door opener.
Might be insecure though so I should put the garage on a Smartthings Zigbee button soon…

I did this

can’t remember the last time I used my finger to open the garage door