找回密码
 立即注册
楼主: bugensui

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

[复制链接]

85

主题

502

回帖

4003

积分

论坛元老

积分
4003
金钱
3416
HASS币
0
发表于 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.
回复

使用道具 举报

174

主题

2599

回帖

8653

积分

元老级技术达人

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

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

使用道具 举报

174

主题

2599

回帖

8653

积分

元老级技术达人

积分
8653
金钱
5875
HASS币
30
 楼主| 发表于 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不通。
回复

使用道具 举报

85

主题

502

回帖

4003

积分

论坛元老

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

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

使用道具 举报

12

主题

140

回帖

1841

积分

论坛技术达人

积分
1841
金钱
1684
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

主题

23

回帖

179

积分

注册会员

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

使用道具 举报

shay 手机认证

13

主题

204

回帖

1389

积分

金牌会员

积分
1389
金钱
1167
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/
回复

使用道具 举报

174

主题

2599

回帖

8653

积分

元老级技术达人

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

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

triggers:
  - seconds: /3
    trigger: time_pattern


回复

使用道具 举报

6

主题

193

回帖

1049

积分

金牌会员

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

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

使用道具 举报

innx 手机认证

23

主题

173

回帖

2744

积分

论坛DIY达人

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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-6-1 18:29 , Processed in 0.163737 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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