Skip to content

Commit

Permalink
add teckin plug
Browse files Browse the repository at this point in the history
  • Loading branch information
eifinger committed Dec 18, 2018
1 parent 3dd5b13 commit 4fb2305
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 6 deletions.
2 changes: 2 additions & 0 deletions customize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ sensor.dishwasher_power_usage_today:
icon: mdi:gauge
sensor.dishwasher_power_usage_total:
icon: mdi:gauge
sensor.teckin_power_usage:
show_last_changed: true
sensor.gas_station_star:
icon: mdi:gas-station
custom_ui_state_card: state-card-custom-ui
Expand Down
4 changes: 4 additions & 0 deletions group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ default_view:
- media_player.denon_avrx1300w
- group.livingroom
- group.occupancy
- switch.bedroom_receiver

view_lights:
name: Lights
Expand Down Expand Up @@ -258,6 +259,9 @@ power_usage:
- sensor.dishwasher_power_usage
- sensor.dishwasher_power_usage_today
- sensor.dishwasher_power_usage_total
- sensor.teckin_power_usage
- sensor.teckin_power_usage_today
- sensor.teckin_power_usage_total


weather_dark_ky:
Expand Down
33 changes: 33 additions & 0 deletions sensor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,39 @@
value_template: "{{ value_json['AM2301'].Humidity }}"
name: 'Large Ventilator Humidity'
unit_of_measurement: '%'
- platform: mqtt
name: "teckin_power_usage"
friendly_name: Schlafzimmerreceiver Verbrauch
icon: mdi:speaker
state_topic: "tele/sonoff_teckin/SENSOR"
value_template: "{{ value_json['ENERGY'].Power }}"
unit_of_measurement: "W"
availability_topic: "tele/sonoff_teckin/LWT"
qos: 2
payload_available: "Online"
payload_not_available: "Offline"
- platform: mqtt
name: "teckin_power_usage_today"
friendly_name: Schlafzimmerreceiver Heute
icon: mdi:speaker
state_topic: "tele/sonoff_teckin/SENSOR"
value_template: "{{ value_json['ENERGY'].Today }}"
unit_of_measurement: "kWh"
availability_topic: "tele/sonoff_teckin/LWT"
qos: 2
payload_available: "Online"
payload_not_available: "Offline"
- platform: mqtt
name: "teckin_power_usage_total"
friendly_name: Schlafzimmerreceiver Total
icon: mdi:speaker
state_topic: "tele/sonoff_teckin/SENSOR"
value_template: "{{ value_json['ENERGY'].Total }}"
unit_of_measurement: "kWh"
availability_topic: "tele/sonoff_teckin/LWT"
qos: 2
payload_available: "Online"
payload_not_available: "Offline"
#################################################################
## Travel Times
#################################################################
Expand Down
26 changes: 20 additions & 6 deletions switch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@
timeout: 15
switches:
broadlink_tv:
friendly_name: "Fernseher"
command_on: 'JgAYAZWREzcSOBE4EhISExITEhISExI4ETgSNxITEhMSExETEhMSExI3EhMSExETEhMSExISEjgSExE4EjcSOBI3EjgSNxIABgWUkxM2EjgSNxITEhMSEhITEhMSNxI4EjcSExISEhMSExITEhISOBISEhMSExITEhISExI3EhMSOBE4EjcSOBI3EjgSAAYFk5QSNxI4EjcSExISEhMSExISEjgSNxI4EhISExITEhMRExITEjcSExITEhMRExITEhMSNxITEjcSOBI3EjcSOBI3EgAGBpWREzcSNxI4ERMSExITEhISExI4ETgSNxITEhMSEhITEhMSExI3EhMSEhITEhMSExETEjgSEhI4EjcSOBI3EjcSOBIADQU=='
command_off: 'JgAYAZWREzcSOBE4EhISExITEhISExI4ETgSNxITEhMSExETEhMSExI3EhMSExETEhMSExISEjgSExE4EjcSOBI3EjgSNxIABgWUkxM2EjgSNxITEhMSEhITEhMSNxI4EjcSExISEhMSExITEhISOBISEhMSExITEhISExI3EhMSOBE4EjcSOBI3EjgSAAYFk5QSNxI4EjcSExISEhMSExISEjgSNxI4EhISExITEhMRExITEjcSExITEhMRExITEhMSNxITEjcSOBI3EjcSOBI3EgAGBpWREzcSNxI4ERMSExITEhISExI4ETgSNxITEhMSEhITEhMSExI3EhMSEhITEhMSExETEjgSEhI4EjcSOBI3EjcSOBIADQU=='
goldie_clean:
Expand All @@ -140,16 +139,14 @@
command_on: 'JgBcAJKQEhIREhIREjUSEhIREjUSEZKQEhISERISETYREhISETUSEpKQERISERISEjUSERISETYREpKQEhESEhESEjUSEhESEjUSEZKQEhIREhISETUSEhISETUSAA0FAAAAAAAAAAAAAAAA'
command_off: 'JgBcAJKQEhIREhIREjUSEhIREjUSEZKQEhISERISETYREhISETUSEpKQERISERISEjUSERISETYREpKQEhESEhESEjUSEhESEjUSEZKQEhIREhISETUSEhISETUSAA0FAAAAAAAAAAAAAAAA'
broadlink_markise:
friendly_name: "Markise"
command_on: 'sgCIAcY6HR0dHToeHDoeHR0dHR0dHR0dHR06HcE7HR0dHR0dOh4cOh0d3js6Oh0dHR0eHDoeHB2kAATxxjodHR4cOh4cOx0dHR0dHR0dHR0dHTodwTsdHR0dHR06Hhw6HhzeOzo6HR0dHR0dOh4cHaUABPDGOh4cHhw6Hhw7HR0dHR0dHR0dHR0dOh3BOx0dHR0dHToeHDodHd47OjodHR0dHR45HhweowAE8cY6HR0dHToeHDsdHR0dHR0dHR0dHR06HcE7HR0dHR0dOh4cOh4c3zo6Oh0dHR0eHDoeHB6kAATwxjodHR0dOh4cOx0dHR0dHR0dHR0eHDodwjodHR0dHhw6Hhw6HR3fOjo6HhwdHR4cOh4cHqQABPDGOh0eHRw6Hhw7HR0dHR0dHR0dHR4cOh3COh0dHR0dHToeHDoeHd46OjoeHR0cHh05HhwepAAE8MY6Hh0dHTkeHDsdHR0dHR0dHR0dHhw6HsA7HR0dHR0dOh4cOx0d3jo6Oh0dHhweHTkeHB6kAAXc'
command_off: 'sgAQA8Y7HR0dHTkeHDsdHR0dHR0eHB0dHhweHd46HR0dHR4cOh4cOx0d3js5Ox0dHR0dHTkeHB6kAATwxjsdHR0dOh0cOx0dHR0dHR0eHR0dHR0d3joeHB0eHR05Hh06HR3eOjo7HR0dHR0dOh0dHaQABPDGOx0dHR06HR06HR0dHR4cHhweHR0dHR3eOh4dHR0dHTkeHTodHd47OTsdHR0dHR06HR0dpAAE8MY7HR0dHTodHTodHh0dHR0dHR0dHR0dHd47HR0dHR0dOh0cOx0d3js5Ox0dHR0dHToeHB2kAATxxTsdHR0dOh4cOh0eHR0dHB4dHR0dHR0d3joeHR0dHR05Hh06HR3eOzk7HR0dHR0dOh4cHaQABPHFOx0dHR06Hhw7HRweHR0dHR0dHR0dHR3eOx0dHR0dHTodHTodHd47OjodHR0dHR06HhweowAE8cY6HR0eHDoeHDsdHR0dHR0dHR0dHR0dHd47HR0dHR0dOh0dOh0d3zo6Oh0dHR0dHToeHB6jAATxxjodHR0dOh4cOh4dHR0dHR0dHR0dHR0d3zodHR0dHR06Hhw6Hh3dOzo6HR0dHR0eOR4cHqQABPDGOh4cHR45Hhw7HR0dHR0dHR0dHR0dHR3fOh0dHR0dHToeHDsdHN86OjodHR0eHR05HhwepAAE8MY6Hh0dHTkeHTodHR0dHR0dHR0dHhweHN86HR0dHR4cOh4cOx0d3jo6Oh0dHhweHTkeHB6kAATwxjsdHR0dOR4cOx0dHR0dHR0dHhwdHR4c3zodHR0dHR06Hhw7HR3eOjo6HhweHR0dOR4cHqQABPDGOx0dHR05Hhw7HR0dHR0dHhwdHh0cHh3eOh4cHhweHTkeHDsdHd46OjsdHR0dHR05HhwepAAE8MY7HR0dHTkeHDsdHR0dHR0eHB0eHB4dHd46HR0dHh0dOR4cOx0d3jo6Ox0dHR0dHTodHR2kAATxxTsdHR0dOh0dOh0dHR0dHR0dHR4dHR0d3joeHB4dHR05Hhw7HR3eOzk7HR0dHR0dOh4cHaQABdwAAAAAAAAAAA=='
- platform: broadlink
host: !secret rm_mini_ip
mac: !secret rm_mini_mac
timeout: 15
switches:
bedroom_receiver:
friendly_name: "Receiver Schlafzimmer"
broadlink_bedroom_receiver:
command_on: 'JgAOAYWBEz4TPhMfEx8THxMfEz4THxM+Ex8TPhMfEx8THxM+Ez4TPhM+Ex8TPhMfEz4THxM+EwABA4SBEz8SPxIgEiASIBIgEj8SIBI/EiASPxIgEiASIBI/Ej8TPhM+Ex8TPhMfEz4THxM+EwABAoWBEz4TPxIgEiASHxMfEz4THxM+EyASPxIgEiASHxM/Ej8SPxI/Ex8TPhMfEz4THxM+EwABAoWBEz4TPhMfEx8THxMfEz4THxM+Ex8TPhMfEx8THxM+Ez4TPxI/EiASPxIgEj8THxI/EwABAoWBEz4TPhMfEx8THxMfEz4THxM+Ex8TPhMfEx8THxM+Ez4TPhM/EiASPxIgEj8SIBI/EgANBQAAAAAAAAAAAAA='
command_off: 'JgAOAYWBEz4TPhMfEx8THxMfEz4THxM+Ex8TPhMfEx8THxM+Ez4TPhM+Ex8TPhMfEz4THxM+EwABA4SBEz8SPxIgEiASIBIgEj8SIBI/EiASPxIgEiASIBI/Ej8TPhM+Ex8TPhMfEz4THxM+EwABAoWBEz4TPxIgEiASHxMfEz4THxM+EyASPxIgEiASHxM/Ej8SPxI/Ex8TPhMfEz4THxM+EwABAoWBEz4TPhMfEx8THxMfEz4THxM+Ex8TPhMfEx8THxM+Ez4TPxI/EiASPxIgEj8THxI/EwABAoWBEz4TPhMfEx8THxMfEz4THxM+Ex8TPhMfEx8THxM+Ez4TPhM/EiASPxIgEj8SIBI/EgANBQAAAAAAAAAAAAA='
#################################################################
Expand Down Expand Up @@ -183,11 +180,28 @@
state: 'off'
- service: switch.turn_on
data:
entity_id: switch.markise
entity_id: switch.broadlink_markise
turn_off:
- condition: state
entity_id: switch.markise
state: 'on'
- service: switch.turn_off
data:
entity_id: switch.markise
entity_id: switch.broadlink_markise
bedroom_receiver:
friendly_name: "Receiver Schlafzimmer"
value_template: "{{float(states.sensor.teckin_power_usage.state) > 5}}"
turn_on:
- condition: state
entity_id: switch.bedroom_receiver
state: 'off'
- service: switch.turn_on
data:
entity_id: switch.broadlink_bedroom_receiver
turn_off:
- condition: state
entity_id: switch.bedroom_receiver
state: 'on'
- service: switch.turn_off
data:
entity_id: switch.broadlink_bedroom_receiver

0 comments on commit 4fb2305

Please sign in to comment.