diff --git a/custom_components/xiaomi_miio_fan/manifest.json b/custom_components/xiaomi_miio_fan/manifest.json index bcddf23..9826adf 100644 --- a/custom_components/xiaomi_miio_fan/manifest.json +++ b/custom_components/xiaomi_miio_fan/manifest.json @@ -9,8 +9,8 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/syssi/xiaomi_fan/issues", "requirements": [ - "construct==2.10.56", + "construct==2.10.68", "python-miio>=0.5.12" ], - "version": "2023.7.0.0" + "version": "2023.12.0.0" } diff --git a/custom_components/xiaomi_miio_fan/services.yaml b/custom_components/xiaomi_miio_fan/services.yaml index d03cf37..2d6bec3 100644 --- a/custom_components/xiaomi_miio_fan/services.yaml +++ b/custom_components/xiaomi_miio_fan/services.yaml @@ -1,71 +1,119 @@ fan_set_buzzer_on: + name: Set buzzer on description: Turn the buzzer on. fields: entity_id: + name: Entity ID description: Name of the Xiaomi Mi Smart Fan entity. - example: "fan.xiaomi_smart_fan" + selector: + entity: + integration: xiaomi_miio_fan + domain: fan fan_set_buzzer_off: + name: Set buzzer off description: Turn the buzzer off. fields: entity_id: + name: Entity ID description: Name of the Xiaomi Mi Smart Fan entity. - example: "fan.xiaomi_smart_fan" + selector: + entity: + integration: xiaomi_miio_fan + domain: fan fan_set_child_lock_on: + name: Set child lock on description: Turn the child lock on. fields: entity_id: + name: Entity ID description: Name of the Xiaomi Mi Smart Fan entity. - example: "fan.xiaomi_smart_fan" + selector: + entity: + integration: xiaomi_miio_fan + domain: fan fan_set_child_lock_off: + name: Set child lock off description: Turn the child lock off. fields: entity_id: + name: Entity ID description: Name of the Xiaomi Mi Smart Fan entity. - example: "fan.xiaomi_smart_fan" + selector: + entity: + integration: xiaomi_miio_fan + domain: fan fan_set_led_brightness: - description: Set the led brightness. + name: Set LED brightness + description: Set the LED brightness. fields: entity_id: + name: Entity ID description: Name of the Xiaomi Mi Smart Fan entity. - example: "fan.xiaomi_smart_fan" + selector: + entity: + integration: xiaomi_miio_fan + domain: fan brightness: + name: Brightness description: Brightness (0 = Bright, 1 = Dim, 2 = Off) example: 1 fan_set_natural_mode_on: + name: Set natural mode on description: Turn the natural mode on. fields: entity_id: + name: Entity ID description: Name of the Xiaomi Mi Smart Fan entity. - example: "fan.xiaomi_smart_fan" + selector: + entity: + integration: xiaomi_miio_fan + domain: fan fan_set_natural_mode_off: + name: Set natural mode off description: Turn the natural mode off. fields: entity_id: + name: Entity ID description: Name of the Xiaomi Mi Smart Fan entity. - example: "fan.xiaomi_smart_fan" + selector: + entity: + integration: xiaomi_miio_fan + domain: fan fan_set_oscillation_angle: + name: Set oscillation angle description: Set the oscillation angle. fields: entity_id: + name: Entity ID description: Name of the Xiaomi Mi Smart Fan entity. - example: "fan.xiaomi_smart_fan" + selector: + entity: + integration: xiaomi_miio_fan + domain: fan angle: + name: Angle description: Supported values are 30, 60, 90, 120, 140 or 150 degrees. example: 30 fan_set_delay_off: + name: Set delay off description: Set the scheduled turn off time. fields: entity_id: + name: Entity ID description: Name of the Xiaomi Mi Smart Fan entity. - example: "fan.xiaomi_smart_fan" + selector: + entity: + integration: xiaomi_miio_fan + domain: fan delay_off_countdown: + name: Delay off countdown description: Time in minutes. Valid values are 0, 60, 120, 180, 240, 300, 240, 300, 360, 420, 480 minutes. example: 60 diff --git a/custom_components/xiaomi_miio_fan/strings.json b/custom_components/xiaomi_miio_fan/strings.json new file mode 100644 index 0000000..3c6ee91 --- /dev/null +++ b/custom_components/xiaomi_miio_fan/strings.json @@ -0,0 +1,106 @@ +{ + "services": { + "fan_set_buzzer_on": { + "name": "Set buzzer on", + "description": "Turn the buzzer on.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the Xiaomi Mi Smart Fan entity." + } + } + }, + "fan_set_buzzer_off": { + "name": "Set buzzer off", + "description": "Turn the buzzer off.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the Xiaomi Mi Smart Fan entity." + } + } + }, + "fan_set_child_lock_on": { + "name": "Set child lock on", + "description": "Turn the child lock on.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the Xiaomi Mi Smart Fan entity." + } + } + }, + "fan_set_child_lock_off": { + "name": "Set child lock off", + "description": "Turn the child lock off.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the Xiaomi Mi Smart Fan entity." + } + } + }, + "fan_set_led_brightness": { + "name": "Set LED brightness", + "description": "Set the LED brightness.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the Xiaomi Mi Smart Fan entity." + }, + "brightness": { + "name": "Brightness", + "description": "Brightness (0 = Bright, 1 = Dim, 2 = Off)" + } + } + }, + "fan_set_natural_mode_on": { + "name": "Set natural mode on", + "description": "Turn the natural mode on.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the Xiaomi Mi Smart Fan entity." + } + } + }, + "fan_set_natural_mode_off": { + "name": "Set natural mode off", + "description": "Turn the natural mode off.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the Xiaomi Mi Smart Fan entity." + } + } + }, + "fan_set_oscillation_angle": { + "name": "Set oscillation angle", + "description": "Set the oscillation angle.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the Xiaomi Mi Smart Fan entity." + }, + "angle": { + "name": "Angle", + "description": "Supported angles are 30, 60, 90, 120, 140 or 150 degrees." + } + } + }, + "fan_set_delay_off": { + "name": "Set delay off", + "description": "Set the scheduled turn off time.", + "fields": { + "entity_id": { + "name": "Entity ID", + "description": "Name of the Xiaomi Mi Smart Fan entity." + }, + "delay_off_countdown": { + "name": "Delay off countdown", + "description": "Time in minutes. Valid values are 0, 60, 120, 180, 240, 300, 240, 300, 360, 420, 480 minutes." + } + } + } + } +}