# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
shell_command: !include shell_commands.yaml

switch:
  - platform: wake_on_lan
    name: "mini PC"
    host: "192.168.178.87"
    mac: "58:47:CA:78:4E:59"
    turn_off:
      service: shell_command.turn_off_remote_pc


#MQTT Broker for milight hub:
mqtt:
  sensor:
    - name: 'Temperature'
      state_topic: 'living/sensor1'    
      unit_of_measurement: '°C'
      value_template: '{{ value_json.temperature }}'
    
    - name: 'Humidity'
      state_topic: 'living/sensor1'
      unit_of_measurement: '%'
      value_template: '{{ value_json.humidity }}'

    - name: 'Temperature 2'  
      state_topic: 'living/sensor2'
      unit_of_measurement: '°C'
      value_template: '{{ value_json.temperature }}'


    - name: 'Humidity 2'
      state_topic: 'living/sensor2'
      unit_of_measurement: '%'
      value_template: '{{ value_json.humidity }}'

    - name: 'Humidity 3'
      state_topic: 'living/sensor2'
      unit_of_measurement: '%'
      value_template: '{{ value_json.soilhumidity }}'
 
    
    - name: 'Battery'
      state_topic: 'living/sensor2'
      unit_of_measurement: 'mV'
      value_template: '{{ value_json.battery }}'

  switch:
    - name: "Schalter 1 Schreibtisch"
      command_topic: living/plug
      payload_on: "83029"
      payload_off: "83028"
    
    - name: "Schalter 2 HerrBert"
      command_topic: living/plug
      payload_on: "86101"
      payload_off: "86100"
  
    - name: "Schalter 3 Schlafzimmer TV"
      command_topic: living/plug
      payload_on: "70741"
      payload_off: "70740"
    
    - name: "Steckdose 4"
      command_topic: living/plug
      payload_on: "21589"
      payload_off: "21588"

    - name: "Pumpe"
      command_topic: greenhousino/pump
      state_topic: greenhousino/pumpstate
      payload_on: "90000"
      payload_off: "off"
    

# enable the recorder integration (optional)
recorder:


http:
  # For extra security set this to only accept connections on localhost if NGINX is on the same machine
  # Uncommenting this will mean that you can only reach Home Assistant using the proxy, not directly via IP from other clients.
  # server_host: 127.0.0.1
  use_x_forwarded_for: true
  # You must set the trusted proxy IP address so that Home Assistant will properly accept connections
  # Set this to your NGINX machine IP, or localhost if hosted on the same machine.
  trusted_proxies: 192.168.178.84 
