找回密码
 立即注册

微信扫码登录

搜索
楼主: bugensui

[技术探讨] (技术探讨)你们是怎么判断电视是否开机的?

[复制链接]

87

主题

520

回帖

4175

积分

论坛元老

积分
4175
金钱
3568
HASS币
30
发表于 2025-5-13 16:34:47 | 显示全部楼层
ping可以更改时间间隔:
Polling interval
By default, the integration will ping the device every 30 seconds. If you wish to do a ping at a different interval, you can disable the automatic refresh in the integration’s system options (Enable polling for updates) and create your own automation with your desired frequency.
回复

使用道具 举报

179

主题

2714

回帖

9150

积分

元老级技术达人

积分
9150
金钱
6242
HASS币
80
 楼主| 发表于 2025-5-13 16:36:35 | 显示全部楼层
shay 发表于 2025-5-13 16:29
换电视,换个ha支持的电视没烦恼。

你的电视是实时显示状态的吗?
回复

使用道具 举报

179

主题

2714

回帖

9150

积分

元老级技术达人

积分
9150
金钱
6242
HASS币
80
 楼主| 发表于 2025-5-13 16:37:32 | 显示全部楼层
silas3082 发表于 2025-5-13 16:34
ping可以更改时间间隔:
Polling interval
By default, the integration will ping the device every 30 s ...

即使改成1秒ping一次也不行吧,电视开机到系统完成,然后到桌面,应该要时间,应该在这个过程中,ping不通。
回复

使用道具 举报

87

主题

520

回帖

4175

积分

论坛元老

积分
4175
金钱
3568
HASS币
30
发表于 2025-5-13 16:49:53 | 显示全部楼层
bugensui 发表于 2025-5-13 16:37
即使改成1秒ping一次也不行吧,电视开机到系统完成,然后到桌面,应该要时间,应该在这个过程中,ping不 ...

这段时间你也看不了电视啊,改成1s基本没什么体验上的差别。我就是ping,开机之后开启指定软件,还是挺流畅丝滑的
回复

使用道具 举报

12

主题

140

回帖

1870

积分

论坛技术达人

积分
1870
金钱
1713
HASS币
30
发表于 2025-5-13 16:54:14 | 显示全部楼层
使用自动化刷新轮刷就行了,我就设置了5秒自动刷新,方法:把PING里的系统设置的”启用轮询更新“关闭,自动化设置轮刷
alias: 电视轮询5秒刷新
description: ""
trigger:
  - platform: time_pattern
    seconds: "0"
  - platform: time_pattern
    seconds: "5"
  - platform: time_pattern
    seconds: "10"
  - platform: time_pattern
    seconds: "15"
  - platform: time_pattern
    seconds: "20"
  - platform: time_pattern
    seconds: "25"
  - platform: time_pattern
    seconds: "30"
  - platform: time_pattern
    seconds: "35"
  - platform: time_pattern
    seconds: "40"
  - platform: time_pattern
    seconds: "45"
  - platform: time_pattern
    seconds: "50"
  - platform: time_pattern
    seconds: "55"
condition: []
action:
  - target:
      entity_id:
        - binary_sensor.tcldian_shi
        - binary_sensor.192_168_10_223
    data: {}
    action: homeassistant.update_entity
mode: single
回复

使用道具 举报

0

主题

24

回帖

191

积分

注册会员

积分
191
金钱
167
HASS币
0
发表于 2025-5-13 17:06:08 | 显示全部楼层
带dlna的可以自动接入ha
回复

使用道具 举报

shay 手机认证

15

主题

274

回帖

1646

积分

金牌会员

积分
1646
金钱
1352
HASS币
20
发表于 2025-5-13 17:08:03 | 显示全部楼层
本帖最后由 shay 于 2025-5-13 17:17 编辑
bugensui 发表于 2025-5-13 16:36
你的电视是实时显示状态的吗?

对啊,因为丫是个media设备,开关当然不在话下。/integrations/braviatv /integrations/androidtv_remote/
回复

使用道具 举报

179

主题

2714

回帖

9150

积分

元老级技术达人

积分
9150
金钱
6242
HASS币
80
 楼主| 发表于 2025-5-13 23:01:16 | 显示全部楼层
hunl1986 发表于 2025-5-13 16:54
使用自动化刷新轮刷就行了,我就设置了5秒自动刷新,方法:把PING里的系统设置的”启用轮询更新“关闭,自 ...

我也是这个思路,我目前用的是每隔3秒ping一次,你的代码不够简洁,可以用这个试试

triggers:
  - seconds: /3
    trigger: time_pattern


回复

使用道具 举报

10

主题

214

回帖

1193

积分

金牌会员

积分
1193
金钱
959
HASS币
40
发表于 2025-5-14 08:37:24 | 显示全部楼层
bugensui 发表于 2025-5-13 16:22
这个要改插座,也挺麻烦,

独立的智能插座,不是智能墙壁插座
回复

使用道具 举报

innx 手机认证

27

主题

212

回帖

2930

积分

论坛DIY达人

积分
2930
金钱
2686
HASS币
30
发表于 2025-5-14 09:50:22 | 显示全部楼层
用的这个方案,优点是无损安装实时反馈 https://www.bilibili.com/video/BV1h142117xb/
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-7-19 14:19 , Processed in 0.461363 second(s), 9 queries , MemCached On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表