Each device registers a sensor calledsensor.xxx其中XXX是您的别名(如果设置一个)或设备ID。它的属性之一称为路径,并显示了当前所述设备正在使用的路径。

编辑:might be useful.

谢谢! That was the missing piece I couldn’t figure out, now it works:微笑:

Somehow, the generated deviceID changed on me. This happened twice on two different devices. I have no idea what I did to cause this. I am using the custom alias to assign a name for the deviceID, but when the underlying generated deviceID changes, the alias does not pair.

为了防止这种情况发生,我看到可以在家庭助理URL中指定DeviceID。19463331伟德国际听起来很棒,但是…

我正在使用家庭助理Androi19463331伟德国际d应用程序:

  • I went to App Configuration and entered Home Assistant URL:https://mydomain.com/?deviceid = test
  • 我看不到“保存”按钮,所以我击中了后箭头。
  • 我再次选择应用程序配置,而家庭助理URL已恢复为:19463331伟德国际https://mydomain.com(即,没有DeviceID)
  • 重新启动应用没有区别。
  • So I cleared the App data and cache, ant reinitialized the App. I.e., it asked for the external URL during startup.
  • 我再次输入:https://mydomain.com/?deviceid = test
  • 初始化并登录后,我去了App Configuration,并感到失望地看到它仍然恢复为:https://mydomain.com(即,没有DeviceID)

I understand this is not necessarily a browser_mod issue, but I am posting here because I am hoping others here have figured a way to specify deviceID for the Android App.

有没有办法获取该应用程序在URL中保存deviceID =?

还有另一种方法吗?

也许有人可以尝试在应用程序中的URL中添加DeviceID =,并让我知道它是否持续存在。至少我会知道这不是我做错的事情。:liticle_smile:

Thanks!

通过快速测试,它似乎也不会留下来。

因此,这听起来像是一个错误……有人可以建议正确报告吗?即,我想这仅与Android应用有关。(我没有尝试过iOS-没有任何Apple设备)。

Unless it is by design, for some reason I don’t understand… If so, perhaps someone can enlighten me, and suggest the way around it. Actually, a way around it would be welcome in any case!

这是一个很好的功能,因为这意味着您不必跟踪随机生成的代码,也不必在HA配置文件中设置名称关联。

I received this reply from an HA dev:

“In all cases that are accepted into HA core if any integration requires additional information that is either provided in YAML or the config entry. There is no URL modding. For the app itself we use the URL you provide in lots of other places. We use that same URL for the webview and all other communication made to your HA server. We require the base URL and during onboarding it is all that is requested. As this is a custom integration you may want to reach out and request another way to enter the device ID or just use a real browser for it as its also called browser_mod the app itself we are a webview and not really a browser. Regarding hosting elsewhere that is more of a proxy thing and not related to the app to pop-up a username and password. Still not an HA standard.”

So it sounds like this behavior is by design. Is there any other way possible to get a user defined deviceID into the browser (now or in the future)?

我刚刚找到了解决问题的解决方案set_theme服务。
当添加光/暗模式支持时,看起来这种破裂了 - 家庭助理期望选定的主题是一个对象(例如{“主题”:“主题名称”}),而不仅仅是字符串。19463331伟德国际更改这样的电话似乎有效:

- 服务:browser_mod.set_theme数据:主题:主题:“主题名称” deviceid: -  mydevice

编辑:这也可用于在“默认”主题的DAR/LIGHT模式之间切换。例如:

- 服务:browser_mod.set_theme数据:主题:主题:“默认”黑暗:true#for dark Mode for Light Mode for Light Mode DeviceID: -  myDevice: -  mydevice

你去?deviceID=testonce,之后,您的DeveodeDID将是测试

我认为问题在于,这在常规的Web浏览器中可以正常工作,但是没有办法可以获取移动应用程序(Android或iOS)进入该网址。如果将其包含在配置中,则该应用程序不会传递“ DeviceID”部分。

我在售货亭模式下使用HA,但我没有得到DeviceID。我使用了browser_mode.debug,但没有创建ID。您如何创建ID?

这尚未得到认可:

browser_mod.js:149:19230 TypeError: undefined is not an object (evaluating 'this._blackout.style')

填充home-assistant.log

Should be fixed in the currentmasterversion (if installed from HACS). I’m not ready to make it a release yet, because I haven’t tested it in FKB, but it will be 1.2.0.

更新到版本1.2.0,弹出标题显示为未定义

4个喜欢

大家好。
Is there a way how to achieve the pop up auto closing after preset time is over?
Example: click on button=>pop up=>30 secs=> pop up closes:liticle_smile:

Uups, I see that it is no go. Not in the direct way.

大家好,

First, i love this custom component very much. I usually use it for pop_up cards.
但是我在HA的核心记录中发现了一些错误。我的HA几乎每天都在崩溃。我可以ping raspberrypi3,但是网络接口无法到达,我必须重新启动它。
So when checking al the errors in the logging i found this. And maybe it has nothing to do with the crash of HA but Iwill fix this error. The error is:

> 2020-10-30 11:11:19 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: browser_mod > 2020-10-30 11:11:24 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.547697897536] Error handling message: Unknown error > Traceback (most recent call last): > File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle > handler(self.hass, self, schema(msg)) > File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update > devices[deviceID].update(msg.get("data", None)) > File "/config/custom_components/browser_mod/connection.py", line 83, in update > self.sensor = self.sensor or create_entity( > File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity > adder = hass.data[DOMAIN][DATA_ADDERS][platform] > KeyError: 'sensor' > 2020-10-30 11:11:34 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.547697897536] Error handling message: Unknown error > Traceback (most recent call last): > File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle > handler(self.hass, self, schema(msg)) > File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update > devices[deviceID].update(msg.get("data", None)) > File "/config/custom_components/browser_mod/connection.py", line 83, in update > self.sensor = self.sensor or create_entity( > File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity > adder = hass.data[DOMAIN][DATA_ADDERS][platform] > KeyError: 'sensor'

我已经通过HACS重新安装了浏览器_MOD。
具有HASSOS 4.15的RaspberryPI3,HA 0.116.4。

我希望有人可以帮助我解决这些错误。

这可以通过在脚本中调用弹出窗口,然后将其添加到序列来实现

- 延迟:秒:30-服务:browser_mod.command数据:命令:关闭流程

Hope this helps

我有点困惑。

So far I have (on wall panel) followingcustom:button-card配置:

- type: "custom:button-card" template: custom_button_sensor_on_active_glow entity: binary_sensor.hydro_mb name: Reduction tap_action: action: call-service service: browser_mod.popup service_data: deviceID: - this title: Hydrolysis hide_header: true card: type: entities实体: - 实体:input_boolean.cover类型:自定义:多 - 实性行名称:Hydro还原切换:true show_state:true state_state:true state_color:true Entities: -  Entity: -  input_select.hydro_reduction:降低

如果我单击按钮,它将弹出。如果我单击弹出窗口的区域,它将关闭。
我不知道如何从它发出脚本或如何做。
你能把我推向正确的方向吗?
Should I call two services i.e.弹出窗口and脚本under onetap-action

这是使用脚本 - >的示例链接https://github.com/thomasloven/hass-browser_mod/wiki/cookbook

UPS…我应该仔细阅读:liticle_smile:
谢谢:+1:

你好,
在弹出窗口中,我有一个按钮,单击它会导航到另一个视图,但是我希望该弹出窗口在单击后将关闭。
我无法处理,有什么建议吗?