Skip to content

Commit

Permalink
Update mqtt_json.py to the version PRed to Home Assistant.
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanmailloux committed Aug 10, 2016
1 parent c029bff commit b5ea1f3
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions mqtt_json.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
"""
Support for MQTT JSON lights.
See https://github.com/corbanmailloux/esp-mqtt-rgb-led
for the corresponding ESP8266 sample light.
Much of this code is borrowed from the standard MQTT light
that comes with Home Assistant.
Setup:
Place this file in:
{HASS-CONFIG-DIRECTORY}/custom_components/light/
Add the following to your configuration.yaml, setting
the values appropriately:
light:
- platform: mqtt_json
name: mqtt_json_light_1
state_topic: "home/rgb1"
command_topic: "home/rgb1/set"
brightness: true
rgb: true
flash_time_short: 2
flash_time_long: 10
optimistic: false
qos: 0
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.mqtt_json/
"""

import logging
Expand All @@ -47,7 +24,7 @@

DEPENDENCIES = ["mqtt"]

DEFAULT_NAME = "MQTT Light"
DEFAULT_NAME = "MQTT JSON Light"
DEFAULT_OPTIMISTIC = False
DEFAULT_BRIGHTNESS = False
DEFAULT_RGB = False
Expand Down

0 comments on commit b5ea1f3

Please sign in to comment.