Fix mobile_app missing state in sensor registration (#36604)

This commit is contained in:
Franck Nijhof 2020-06-09 20:06:52 +02:00 committed by GitHub
parent 854bdfb6f2
commit 2abd3844cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 1 deletions

View file

@ -356,7 +356,9 @@ async def webhook_enable_encryption(hass, config_entry, data):
vol.Required(ATTR_SENSOR_TYPE): vol.In(SENSOR_TYPES),
vol.Required(ATTR_SENSOR_UNIQUE_ID): cv.string,
vol.Optional(ATTR_SENSOR_UOM): cv.string,
vol.Required(ATTR_SENSOR_STATE): vol.Any(None, bool, str, int, float),
vol.Optional(ATTR_SENSOR_STATE, default=None): vol.Any(
None, bool, str, int, float
),
vol.Optional(ATTR_SENSOR_ICON, default="mdi:cellphone"): cv.icon,
}
)