Refactored pydantic implementation, cleaner with nested validation
This commit is contained in:
14
projmon/haconfig.py
Normal file
14
projmon/haconfig.py
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
HA_CONFIG_TEMPLATE = {
|
||||
"name": "{device_friendly_name}",
|
||||
"state_topic": "homeassistant/sensor/{device_name}/{device_state}/state",
|
||||
"unique_id": "{device_name}_status",
|
||||
"icon": "{device_icon}",
|
||||
"device": {
|
||||
"identifiers": ["{device_name}"],
|
||||
"name": "{device_friendly_name}",
|
||||
"manufacturer": "Edelweiss_Automation",
|
||||
"model": "Edelweiss_Automation"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user