TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.
if 'entity_id' not in data: | |
logger.warning("===== entity_id is required if you want to set something.") | |
else: | |
data = data.copy() | |
inputEntity = data.pop('entity_id') | |
inputStateObject = hass.states.get(inputEntity) | |
if inputStateObject: | |
inputState = inputStateObject.state | |
inputAttributesObject = inputStateObject.attributes.copy() | |
else: |
# Yowsit Smart Bluetooth Plug configuration for home-assistant | |
# | |
# https://www.yoswit.com/products/smart-home-accessories/smart-plug.html | |
# https://www.home-assistant.io/ | |
switch: | |
- platform: command_line | |
switches: | |
living_room_lamp: | |
command_on: gatttool -b 20:91:48:5B:16:9D --char-write-req -a 0x0e -n 02 |