
# 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

homematic:
  interfaces:
    ip:
      host: raspberrymatic
      port: 2010
      resolvenames: json
    rf:
      host: raspberrymatic
      port: 2001
      resolvenames: json
  hosts:
    ccu3:
      host: raspberrymatic

#MQTT Broker for milight hub:
mqtt:
  broker: mqtt
  port: 1883
  discovery: true
  discovery_prefix: homeassistant

sensor 1:
  platform: mqtt
  state_topic: 'living/sensor1'
  name: 'Temperature'
  unit_of_measurement: '°C'
  value_template: '{{ value_json.temperature }}'

sensor 2:
  platform: mqtt
  state_topic: 'living/sensor1'
  name: 'Humidity'
  unit_of_measurement: '%'
  value_template: '{{ value_json.humidity }}'

sensor 3:
  platform: mqtt
  state_topic: 'living/sensor2'
  name: 'Temperature 2'
  unit_of_measurement: '°C'
  value_template: '{{ value_json.temperature }}'

sensor 4:
  platform: mqtt
  state_topic: 'living/sensor2'
  name: 'Humidity 2'
  unit_of_measurement: '%'
  value_template: '{{ value_json.humidity }}'

sensor 5:
  platform: mqtt
  state_topic: 'living/sensor2'
  name: 'Humidity 3'
  unit_of_measurement: '%'
  value_template: '{{ value_json.soilhumidity }}'
sensor 6:
  platform: mqtt
  state_topic: 'living/sensor2'
  name: 'Battery'
  unit_of_measurement: 'mV'
  value_template: '{{ value_json.battery }}'


switch 1:
- platform: mqtt
  command_topic: living/plug
  payload_on: "83028"
  payload_off: "83029"
  name: "Steckdose 1"

switch 2:
- platform: mqtt
  command_topic: living/plug
  payload_on: "86101"
  payload_off: "86100"
  name: "Steckdose 2"


switch 3:
- platform: mqtt
  command_topic: living/plug
  payload_on: "70741"
  payload_off: "70740"
  name: "Steckdose 3"

switch 4:
- platform: mqtt
  command_topic: living/plug
  payload_on: "21589"
  payload_off: "21588"
  name: "Steckdose 4"

switch 5:
- platform: mqtt
  command_topic: greenhousino/pump
  state_topic: greenhousino/pumpstate
  payload_on: "30000"
  payload_off: "off"
  name: "Pumpe"

# 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 
