diff --git a/homeassistant/components/reolink/binary_sensor.py b/homeassistant/components/reolink/binary_sensor.py index bbf72056c9b..5fe14c6223c 100644 --- a/homeassistant/components/reolink/binary_sensor.py +++ b/homeassistant/components/reolink/binary_sensor.py @@ -71,7 +71,16 @@ BINARY_SENSORS = ( icon="mdi:dog-side", icon_off="mdi:dog-side-off", value=lambda api, ch: api.ai_detected(ch, PET_DETECTION_TYPE), - supported=lambda api, ch: api.ai_supported(ch, PET_DETECTION_TYPE), + supported=lambda api, ch: api.ai_supported(ch, PET_DETECTION_TYPE) + and not api.supported(ch, "ai_animal"), + ), + ReolinkBinarySensorEntityDescription( + key=PET_DETECTION_TYPE, + translation_key="animal", + icon="mdi:paw", + icon_off="mdi:paw-off", + value=lambda api, ch: api.ai_detected(ch, PET_DETECTION_TYPE), + supported=lambda api, ch: api.supported(ch, "ai_animal"), ), ReolinkBinarySensorEntityDescription( key="visitor", diff --git a/homeassistant/components/reolink/number.py b/homeassistant/components/reolink/number.py index ef9b01a7a52..f031c385c05 100644 --- a/homeassistant/components/reolink/number.py +++ b/homeassistant/components/reolink/number.py @@ -162,7 +162,23 @@ NUMBER_ENTITIES = ( native_min_value=0, native_max_value=100, supported=lambda api, ch: ( - api.supported(ch, "ai_sensitivity") and api.ai_supported(ch, "dog_cat") + api.supported(ch, "ai_sensitivity") + and api.ai_supported(ch, "dog_cat") + and not api.supported(ch, "ai_animal") + ), + value=lambda api, ch: api.ai_sensitivity(ch, "dog_cat"), + method=lambda api, ch, value: api.set_ai_sensitivity(ch, int(value), "dog_cat"), + ), + ReolinkNumberEntityDescription( + key="ai_pet_sensititvity", + translation_key="ai_animal_sensititvity", + icon="mdi:paw", + entity_category=EntityCategory.CONFIG, + native_step=1, + native_min_value=0, + native_max_value=100, + supported=lambda api, ch: ( + api.supported(ch, "ai_sensitivity") and api.supported(ch, "ai_animal") ), value=lambda api, ch: api.ai_sensitivity(ch, "dog_cat"), method=lambda api, ch, value: api.set_ai_sensitivity(ch, int(value), "dog_cat"), @@ -226,7 +242,25 @@ NUMBER_ENTITIES = ( native_min_value=0, native_max_value=8, supported=lambda api, ch: ( - api.supported(ch, "ai_delay") and api.ai_supported(ch, "dog_cat") + api.supported(ch, "ai_delay") + and api.ai_supported(ch, "dog_cat") + and not api.supported(ch, "ai_animal") + ), + value=lambda api, ch: api.ai_delay(ch, "dog_cat"), + method=lambda api, ch, value: api.set_ai_delay(ch, int(value), "dog_cat"), + ), + ReolinkNumberEntityDescription( + key="ai_pet_delay", + translation_key="ai_animal_delay", + icon="mdi:paw", + entity_category=EntityCategory.CONFIG, + entity_registry_enabled_default=False, + native_step=1, + native_unit_of_measurement=UnitOfTime.SECONDS, + native_min_value=0, + native_max_value=8, + supported=lambda api, ch: ( + api.supported(ch, "ai_delay") and api.supported(ch, "ai_animal") ), value=lambda api, ch: api.ai_delay(ch, "dog_cat"), method=lambda api, ch, value: api.set_ai_delay(ch, int(value), "dog_cat"), diff --git a/homeassistant/components/reolink/strings.json b/homeassistant/components/reolink/strings.json index bab2802720d..d81e25e9887 100644 --- a/homeassistant/components/reolink/strings.json +++ b/homeassistant/components/reolink/strings.json @@ -75,6 +75,9 @@ "pet": { "name": "Pet" }, + "animal": { + "name": "Animal" + }, "visitor": { "name": "Visitor" }, @@ -93,6 +96,9 @@ "pet_lens_0": { "name": "Pet lens 0" }, + "animal_lens_0": { + "name": "Animal lens 0" + }, "visitor_lens_0": { "name": "Visitor lens 0" }, @@ -111,6 +117,9 @@ "pet_lens_1": { "name": "Pet lens 1" }, + "animal_lens_1": { + "name": "Animal lens 1" + }, "visitor_lens_1": { "name": "Visitor lens 1" } @@ -245,6 +254,9 @@ "ai_pet_sensititvity": { "name": "AI pet sensitivity" }, + "ai_animal_sensititvity": { + "name": "AI animal sensitivity" + }, "ai_face_delay": { "name": "AI face delay" }, @@ -257,6 +269,9 @@ "ai_pet_delay": { "name": "AI pet delay" }, + "ai_animal_delay": { + "name": "AI animal delay" + }, "auto_quick_reply_time": { "name": "Auto quick reply time" },