Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: add scene history sensor #1361

Merged
merged 9 commits into from
Nov 21, 2023
Merged

Feature: add scene history sensor #1361

merged 9 commits into from
Nov 21, 2023

Conversation

samuelncui
Copy link
Contributor

MihomeSceneHistorySensor can create virtual switches easily. This new sensor allows users to use Xiaomi AI Speakers to control home assistant devices.

By adding automation as follows:

alias: Do something when command to Xiaomi AI Speaker
description: "xxxx"
trigger:
  - platform: state
    entity_id:
      - sensor.mi_xxxxxxxxx_xxxxxxxxx_scene_history
    attribute: scene_id
    to: "123454654" // scene id
condition: []
action:
  - some action
mode: single

Refactor async_get_devices and async_get_homerooms for easier understanding.

@samuelncui
Copy link
Contributor Author

已经测试很久了,可以帮忙合并一下吗?怕后面修改又不兼容了。

custom_components/xiaomi_miot/core/xiaomi_cloud.py Outdated Show resolved Hide resolved
custom_components/xiaomi_miot/sensor.py Show resolved Hide resolved
custom_components/xiaomi_miot/sensor.py Outdated Show resolved Hide resolved
@al-one al-one added the enhancement New feature or request label Nov 21, 2023
@al-one al-one merged commit f9d956a into al-one:master Nov 21, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants