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

青萍空气检测仪只能获取到整数值温湿度数据 #591

Closed
ChristianSwift opened this issue May 16, 2022 · 14 comments
Closed

青萍空气检测仪只能获取到整数值温湿度数据 #591

ChristianSwift opened this issue May 16, 2022 · 14 comments
Labels
bug Something isn't working device: air-monitor fixed bug fixed

Comments

@ChristianSwift
Copy link

ChristianSwift commented May 16, 2022

设备型号:cgllc.airmonitor.s1
image
image
image

@al-one
Copy link
Owner

al-one commented May 17, 2022

请通过开发者工具执行下面的服务,并检查HA侧边栏通知:

service: xiaomi_miot.send_command
data:
  entity_id: sensor.cgllc_s1_xxxx_temperature # 换成你的实体ID
  method: get_value
  params:
    - aqi
    - pm25
    - co2
    - tvoc
    - humidity
    - temperature
    - tvoc_unit
    - temperature_unit
    - battery
    - battery_state
  throw: true

@ChristianSwift
Copy link
Author

image

@al-one
Copy link
Owner

al-one commented May 17, 2022

看截图只有湿度有小数,请多次执行查看其他数据是否返回小数。
并查看湿度实体的历史记录中是否有包含带小数的数据,插件代码中未对数据做取整操作。

@ChristianSwift
Copy link
Author

看截图只有湿度有小数,请多次执行查看其他数据是否返回小数。 并查看湿度实体的历史记录中是否有包含带小数的数据,插件代码中未对数据做取整操作。

是截图那会刚好温度是整数,现在重新截了一下
image

@ChristianSwift
Copy link
Author

ChristianSwift commented May 17, 2022

看截图只有湿度有小数,请多次执行查看其他数据是否返回小数。 并查看湿度实体的历史记录中是否有包含带小数的数据,插件代码中未对数据做取整操作。

历史记录里也都是整数数据
image

@al-one
Copy link
Owner

al-one commented May 17, 2022

请提供开发者工具中的实体属性

@ChristianSwift
Copy link
Author

请提供开发者工具中的实体属性

网页捕获_17-5-2022_12528_10 4 0 10

@ChristianSwift
Copy link
Author

看了一下另外和温湿度相关的issues也存在读取为整数的问题
#569

@ChristianSwift
Copy link
Author

看了一下另外和温湿度相关的issues也存在读取为整数的问题 #569

不确定是不是刚好读到整数可能

@xiaoluozhou
Copy link

正好我有两款青萍的,检查发现ltie版的是能显示小数点的,另一款不行。温度相关实体属性如下:
[sensor.cgllc_cgdn1]
entity_class: MiotSensorSubEntity
parent_entity_id: sensor.cgllc_cgdn1_
service_description: Environment
property_description: Temperature
environment.temperature: 24.6
battery_level: 100
unit_of_measurement: °C
device_class: temperature
friendly_name: 主卧温度
supported_features: 0

另一款
sensor.cgllc_s1_
entity_class: MiotSensorSubEntity
parent_entity_id: sensor.cgllc_s1_
service_description: Environment
property_description: Temperature
environment.temperature: 27
battery_level: 100
unit_of_measurement: °C
device_class: temperature
friendly_name: 书房温度
supported_features: 0

Miio command result
{'battery': 100, 'battery_state': 'charging', 'co2': 450, 'humidity': 34.8, 'pm25': 49.6, 'temperature': 26.8, 'temperature_unit': 'c', 'tvoc': 186, 'tvoc_unit': 'mg_m3'}

@al-one
Copy link
Owner

al-one commented May 18, 2022

已修复,请更新至master分支。

@al-one al-one added bug Something isn't working fixed bug fixed labels May 18, 2022
@ChristianSwift
Copy link
Author

已修复,请更新至master分支。

确认修复,感谢!
另外多嘴提一句,像CO2和tvoc本身整数值的,希望还是可以不用浮点数带0,传感器应该是自带步长信息?
image

@ChristianSwift
Copy link
Author

ChristianSwift commented May 18, 2022

已修复,请更新至master分支。

更新到master分支好像出现无法调用开关灯服务的情况,可能与此相关,烦请检查确认!
WX20220518-200401@2x

al-one added a commit that referenced this issue May 18, 2022
@al-one
Copy link
Owner

al-one commented May 18, 2022

更新到master分支好像出现无法调用开关灯服务的情况,可能与此相关,烦请检查确认!

已修复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working device: air-monitor fixed bug fixed
Projects
None yet
Development

No branches or pull requests

3 participants