Ability to have SensorEntities or BinaryEntities as parameters to read from YAML for an App #307
Locked
ngelotte
started this conversation in
Feature requests
Replies: 1 comment 6 replies
-
So the add to the discussion it would be nice to include the now generated specific entity types by default in netdaemon and extend the YamlAppconfig to allow binding the yaml value to the specific-entity typed property. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice to not have to leave the GeneratedEntity world with all of it's code niceties in order to have the app be flexible and configurable from YAML. So I am proposing being able to specify a parameter like
public SwitchEntity? EntityToControl{ get; set; }
Netdaemon on load would bind the switch entity based on the string in the YAML file. Then in code you could use EntityToControl like any other generated Entity. It would be really nice to be able to have multiple entities in a list like:
public List<SwitchEntity>? EntityToControl{ get; set; }
So that you could have multiple lights or sensors that you are referencing. I have not though this through as much so this might introduce some problems. I am not sure.
Beta Was this translation helpful? Give feedback.
All reactions