!QhvgabMQzwEQeWehhZ:lossy.network

NixOS Home Automation

510 Members
Declarative Home Automation and other Sidequests | https://wiki.nixos.org/wiki/Home_Assistant127 Servers

Load older messages


SenderMessageTime
20 Jun 2021
@instantepiphany:matrix.orginstantepiphany
In reply to @schnecfk:ruhr-uni-bochum.de
Probably for high flexibility of the automations. While I prefer a DSL or something structural, the system that HA uses is rather weak and often requires workarounds like template sensors
I'm not sure why this is something that needs to be decided in this project though - should we be opinionated on that? Or choose a protocol so that any language/executable can be used as long as it follows the interface?
09:32:13
@piegames:matrix.orgpiegames
In reply to @instantepiphany:matrix.org
I'm not disagreeing, just curious - what use case is there for an interpreted language?

So a few use cases that you may want to consider that would make good use of a scripting language:

  • User can write a few lines of code to create automation behavior
  • Plugin system
  • Dynamically loading modules. Let's be frank, if you want to load Rust code at run time you won't have fun.
09:40:14
@instantepiphany:matrix.orginstantepiphany
In reply to @piegames:matrix.org

So a few use cases that you may want to consider that would make good use of a scripting language:

  • User can write a few lines of code to create automation behavior
  • Plugin system
  • Dynamically loading modules. Let's be frank, if you want to load Rust code at run time you won't have fun.

I think the first might be covered by allowing any executable to be called as long as it follows the API. This could be bash, or python, or whatever.

Definitely agree for third.

However for plugins, I was thinking we could do that through the config - e.g the config supplied by the user would specify what protocol should be used to communicate with the target, and set various rules for the automation. I would like to keep as much logic in the config as possible.

09:44:41
@instantepiphany:matrix.orginstantepiphanySo to create automation behaviour, the user would modify the config, via text at first, maybe a GUI much further down the road.09:45:49
@piegames:matrix.orgpiegamesWill the configuration format be a turing complete DSL? Or will it be a simple structured format with inline code blocks in different languages?10:11:33
@instantepiphany:matrix.orginstantepiphany I'm not really sure, but if we go with inline code blocks that might make it difficult to have GUI plugins later - they would have to be able to infer meaning from n supported languages... Though I suppose the code could just be to get or set a state, then we might be able to do that. 10:28:42
@joerg:bethselamin.deMic92 (Old)What other components do they plan to make stateful?11:17:08
@joerg:bethselamin.deMic92 (Old)In home-assistant?11:17:16
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @joerg:bethselamin.de
What other components do they plan to make stateful?
Afaik they want to migrate always from the YAMl configuration completely, making the while configuration of all integrations stateful
11:20:09
@joerg:bethselamin.deMic92 (Old)
In reply to @schnecfk:ruhr-uni-bochum.de
Afaik they want to migrate always from the YAMl configuration completely, making the while configuration of all integrations stateful
Do you have a source for that? This reads different: https://www.home-assistant.io/blog/2020/04/14/the-future-of-yaml/
11:21:37
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @joerg:bethselamin.de
Do you have a source for that? This reads different: https://www.home-assistant.io/blog/2020/04/14/the-future-of-yaml/
The section about ADR0010 explains that in the long term, YAML will fade out, as new integrations won't be allowed to use of YAML (except in rare cases)
11:45:03
@joerg:bethselamin.deMic92 (Old)
In reply to @schnecfk:ruhr-uni-bochum.de
The section about ADR0010 explains that in the long term, YAML will fade out, as new integrations won't be allowed to use of YAML (except in rare cases)
Mhm. I am probably ok with having only my automations in yaml for now. Maintaining a project like home-assistant seems otherwise like a huge effor.
11:46:26
@schnecfk:ruhr-uni-bochum.deCRTifiedAt least for some integrations, although the line between "communicates with a service" and "bridges a protocok" seems fairly thin to me11:46:57
@joerg:bethselamin.deMic92 (Old)Well maybe depends on the integration11:47:00
@hexa:lossy.network@hexa:lossy.network Mic92: https://github.com/home-assistant/core/pull/37800#issuecomment-657707769 11:47:58
@schnecfk:ruhr-uni-bochum.deCRTifiedI mean, even esphome does not support yaml anymore11:48:04
@hexa:lossy.network@hexa:lossy.networkhuh, what?11:48:28
@hexa:lossy.network@hexa:lossy.networkoh, you mean on the home-assistant side11:48:35
@hexa:lossy.network@hexa:lossy.networkbut esphome works great with zeroconf11:48:46
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @hexa:lossy.network
oh, you mean on the home-assistant side
https://www.home-assistant.io/integrations/esphome/ that one, yes
11:49:02
@hexa:lossy.network@hexa:lossy.networkalso they're talking about doing this because then they have control over config migration11:49:58
@joerg:bethselamin.deMic92 (Old)
In reply to @hexa:lossy.network
also they're talking about doing this because then they have control over config migration
Which did not work very well in the past. I remember I had to delete my icloud storage multiple times in the past.
11:53:11
@hexa:lossy.network@hexa:lossy.networkyeah, well. shit happens.11:55:35
@hexa:lossy.network@hexa:lossy.networkbut the general arguments they're giving have merit11:55:46
@hexa:lossy.network@hexa:lossy.networkbecause we are not really the intended target audience11:56:39
@hexa:lossy.network@hexa:lossy.networkI mean, we're using hass inspite of these things11:57:06
@hexa:lossy.network@hexa:lossy.network * I mean, we're using hass in spite of these things11:57:32
@piegames:matrix.orgpiegames Having configuration management from both config files and UI is an incredibly hard task. Usually, you end up getting the worst of both worlds. If you then assume that the configuration is generated from something like Nix and thus is immutable to the UI, things get messy quickly in the UI. 12:12:35
@hexa:lossy.network@hexa:lossy.network Fabian Affolter: homeassistant-cli click 8 compat would be nice, looks like completions are failing 17:07:47
@hexa:lossy.network@hexa:lossy.network

also there are two clis apparently

  • https://github.com/home-assistant-ecosystem/home-assistant-cli
  • https://github.com/home-assistant/cli
17:08:39

Show newer messages


Back to Room ListRoom Version: 6