alienatedsec / yi-hack-v5

Even newer Custom Firmware for Xiaomi Cameras based on Hi3518ev200 Chipset. It includes free RTSP, ONVIF and other improvements based on the work by roleoroleo
GNU General Public License v3.0
739 stars 87 forks source link

fix: WARNING in HA => MQTT entity name starts with the device name in… #327

Closed Minims closed 5 months ago

Minims commented 5 months ago

This PR fix warnings in HomeAssistant since MQTT entity name has changed:

WARNING (MainThread) [homeassistant.components.mqtt.mixins] MQTT entity name starts with the device name in your config {'availability_topic': 'yi/yi-home-720p/status', 'payload_available': 'online', 'payload_not_available': 'offline', 'device': {'identifiers': ['yi-home-720p'], 'manufacturer': 'Yi', 'model': 'Yi Home 720p', 'name': 'Yi Home 720p', 'sw_version': '0.4.1d', 'connections': []}, 'qos': 1, 'device_class': <BinarySensorDeviceClass.MOTION: 'motion'>, 'state_topic': 'yi/yi-home-720p/ai_human_detection', 'name': 'Yi Home 720p Human Detection', 'unique_id': 'yi-home-720p-ai_human_detection', 'payload_on': 'human', 'off_delay': 60, 'force_update': False, 'enabled_by_default': True, 'payload_off': 'OFF', 'availability_mode': 'latest', 'encoding': 'utf-8'}, this is not expected. Please correct your configuration. The device name prefix will be stripped off the entity name and becomes 'Human Detection'
Minims commented 5 months ago

@alienatedsec Can we add this in the pre release too ?

alienatedsec commented 5 months ago

@Minims I will do once I have the other merge conflicts sorted

alienatedsec commented 5 months ago

@Minims This will need to be merged later unless you raise a pull request into a pre-release https://github.com/alienatedsec/yi-hack-v5/tree/pre-release-0.4.1x

Minims commented 5 months ago

@alienatedsec I have update the destination of the PR to pre-release-0.4.1x

alienatedsec commented 5 months ago

@roleoroleo please can you have a quick look?

roleoroleo commented 5 months ago

@roleoroleo please can you have a quick look?

The PR is ok.