feat(devices): Add ETA Noble Smart humidifier#4656
feat(devices): Add ETA Noble Smart humidifier#4656jiriks74 wants to merge 3 commits intomake-all:mainfrom
Conversation
|
I see that this needs cleaning up however I am not familiar enough with the project to do so. I can't spend much more time on this right now so it will take time to figure out how to clean this up. If you'd be willing to look into the translation/icon issues it would be very appreciated. |
|
So far everything seems to be working. I've tested the device the whole afternoon and all the functionality is there (only the overflow error state hasn't been tested). I'll continue monitoring/testing the condfig further but everything (apart from the translation/icon CI issues) works fine. |
87ee6e5 to
58f797f
Compare
There was a problem hiding this comment.
This file was full of special characters at EOL that were removed (^M in NeoVim).
There was a problem hiding this comment.
Most likely there was one extra ^M in there that causes git to treat the file as binary instead of text, I suspect one of my linting tools has a bug that is adding these because they pop up from time to time. I will fix the issue separately, so you can rebase your branch and the merge conflict should go away.
There was a problem hiding this comment.
There don't seem to be any issues like that currently in that file, but it seems to be treated as binary by git, as my Linux VM has it checked out with CRLF line ends while the other translation files have LF line ends. This will cause merge conflicts, as merging of binary files is much more complex than text files.
There was a problem hiding this comment.
I agree, that the character should be caused by CRLF instead of LF.
For editors the fix is to use editorconfig.
It has other benefits like allowing you to select tabs/spaces/number of spaces for each file/filetype specifically, etc.
I'm not sure whether cli tooling will repect this bu it would most likely help other contributors since I many changes will be done in an editor.
cd438ed to
6b965c1
Compare
| - dps_val: auto | ||
| value: auto | ||
| - dps_val: humidity | ||
| value: manual |
There was a problem hiding this comment.
You can use "normal" here to avoid introducing new translations unnecessarily
There was a problem hiding this comment.
This was used in an attempt to be close to what the manual states while being well descriptive.
I'd consider the auto mode to be normal since the device turns on with it selected and the manual states the maintain selected humidity to be manual.
There was a problem hiding this comment.
Manual implies that the user has to manually control when to stop the humidification. I'm not sure what auto does here, maybe adjusts the spray level automatically rather than just off and on, but maintaining selected humidity is the normal expectation for a humidifier, so I think "normal" fits.
The aim of this integration is not to match wording in the device's manual, because we are not just supporting one brand of devices here, there are hundreds of manufacturers selling devices with Tuya modules in them, and no consistency between them. To prevent the integration becoming more bloated than necessary with translations and config files that differ only in wording used, we need to break with the manufacturer's choices and enforce our own standards.
This also has value when you have multiple devices of the same type from different manufacturers and want to control them in a group.
There was a problem hiding this comment.
Manual implies that the user has to manually control when to stop the humidification.
I'm not sure what auto does here, maybe adjusts the spray level automatically rather than just off and on
This device has 3 modes:
- Auto (
AUTO - TEMPin the manual)- The device is fully autonomous
- Maintains humidity that is automatically selected by the device based on current temperature
- Continuous (
MANUALin the manual)- Renamed because of existing translations which are quite descriptive of the mode
- The device doesn't stop humidifying until the user stops it or the water runs out.
- Manual (
AUTO - HUMin the manual)- The device is partially autonomous
- Maintains a manually selected humidity
- Seemed like a good translation after selecting the first two
| "plasma": { | ||
| "name": "Плазма" | ||
| }, | ||
| "night_mode": { |
There was a problem hiding this comment.
You can use sleep instead to avoid introducing a new translation that is the same meaning
There was a problem hiding this comment.
This was used in an attempt to be close to what the manual states while being well descriptive.
The manual reports it as Night mode or Noční režim in Czech which I'd consider quite a stretch from (the) Sleep or Spánek in Czech.
There was a problem hiding this comment.
Maybe the Czech translation could use some work if the current "Sleep" does not mean the same as night mode, as that is the meaning that many other devices give it (reducing lighting brightness and noise to minimum)
There was a problem hiding this comment.
If that was the goal of the translation than something like Režím Spánku (Sleep Mode) would be more appropriate since Spánek is literally the noun Sleep.
Režim Spánku => the device is in a sleep mode - while this still is a bit confusing as sleep mode might indicate that the device is partially off which allows to start up quicker (like a laptop) it is much metter than just (the) sleep
Spánek => the device is, most likely, sleeping
| "rangehood_light": { | ||
| "name": "Светлина на абсорбатора" | ||
| }, | ||
| "tank_led": { |
There was a problem hiding this comment.
You can use the more general indicator instead to avoid unnecessarily adding a new translation.
There was a problem hiding this comment.
This was used in an attempt to be close to what the manual states while being well descriptive.
I'm not sure that this would be right since it doesn't really indicate anything, it's just a pretty LED. I'll look whether other translations could be used since I agree that this has low chance of being reused and likely has an alternative.
There was a problem hiding this comment.
The best match I found so far is light from alarm_mode:
tuya-local/custom_components/tuya_local/translations/cz.json
Lines 823 to 830 in 1a44a2c
There was a problem hiding this comment.
This is not correct, that is a select entity, and the name would be "Alarm mode", only one of the options is "Light".
I think "Ambient light" is reusable, and is fairly high up on the list of pending translations that would be reusable across a number of existing devices. Currently most are named just "Ambient" on the assumption that being a light the "light" part is obvious, but probably including light in the name is better.
There was a problem hiding this comment.
This sounds much better. The translation to Czech could be something like Podsvícení which I find quite high up in the list of descriptive translations for this entity.
6b965c1 to
479efbe
Compare
Adds a configuration, translations and icons for the ETA Noble Smart humidifier.
Translations were generated by LLM with the device manual as a reference.
The base configuration was generated from API explore output but heavily modified to use better names (eg. the manual mode from device manual was renamed to continuous and auto-humidity renamed to manual), reporting fault codes properly and correcting entity categories.