Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #configuration.yaml
- sensor:
- - platform: command_line
- name: Arylic Title String
- unique_id: arylic_title_string
- command: "python3 /config/custom_files/hex2str.py {{ states('sensor.arylic_title') }}"
- command_timeout: 30
- scan_interval: 60
- #/config/custom_files/hex2str.py
- import sys
- if len(sys.argv) > 1:
- n = sys.argv[1]
- print(bytearray.fromhex(n).decode())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement