Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable selection of type of Home Assistant Entity created #317

Closed
guardianbs opened this issue Jan 22, 2022 · 5 comments
Closed

Enable selection of type of Home Assistant Entity created #317

guardianbs opened this issue Jan 22, 2022 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@guardianbs
Copy link

Is your feature request related to a problem? Please describe.
Not really a problem. More of an inconvenience. With version 3.4 the discovery config data sent to Home Assistant has been enhanced to set up Number / Switch / Enum entities for parameters that are 'writeable' . This is good as it saves coding in HA for parameters that are to be updated. Unfortunately some parameters that appear 'writeable' are not, in as much as if you change the value it immediately gets set back to its original value by the device. This means the HA Number / Switch / Enum entity is superfluous and misleading. 'writeable' parameters that cannot be updated would be better if they were set up as sensor entity types. This would save having to set up copy template sensor entities for each of the superfluous Number / Switch / Enum entities.

Describe the solution you'd like
Extract to HA 'writeable' parameters that are not 'writeable' (as defined by the user) as sensor entity types.

Describe alternatives you've considered
Two possibilities. Firstly,The main Dashboard screen could be amended to allow the deletion of the 'writeable' flag. parameters would then appear not 'writeable' and be extracted and set up on HA as sensor entity types. Secondly, as version 3.4 now has the nice feature in Settings / Customization to allow entities to be ignored altogether and not extracted to HA, this screen could be amended to allow parameters to be marked as 'sensor only'. Presumably the table on Settings / Customization is being stored and parsed when generating the HA config entries so those marked 'sensor only' could be extracted accordingly.

Additional context
Add any other context or screenshots about the feature request here.

@guardianbs guardianbs added the enhancement New feature or request label Jan 22, 2022
@proddy
Copy link
Contributor

proddy commented Jan 23, 2022

I can see the need for this. Some people may accidentally move one of the sliders in HA and forget what it was originally set to, and freak out. I've done this a few times.

I suggest extending the Customization Page to show two checkboxes, one for Disabled (excluded) and one for Read Only.

@guardianbs
Copy link
Author

Sounds good 😁

@proddy
Copy link
Contributor

proddy commented Mar 27, 2022

added to b10

@proddy proddy modified the milestones: v3.4.1, v3.4 Mar 27, 2022
@proddy proddy closed this as completed Mar 29, 2022
@proddy proddy reopened this Mar 30, 2022
@proddy
Copy link
Contributor

proddy commented Mar 30, 2022

In the latest implementation, there is still one last thing that needs to be fixed. When an entity is marked to be read-only it should remove the HA config entry (which is number/switch) and mark it to be re-created (as a sensor) so it has immediate effect. Right now you need to restart EMS-ESP.

It can be done by changing the code in EMSdevice::mask_entity()

@proddy
Copy link
Contributor

proddy commented Apr 3, 2022

made some final minor fixes into b11

@proddy proddy closed this as completed Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants