-
Notifications
You must be signed in to change notification settings - Fork 289
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
Add TeslaFi to latest #4236
Add TeslaFi to latest #4236
Conversation
jsonConfig looks good... |
"xs" should specify a value of "12" at admin/jsonConfig.json/items/_StandardTab/_donate -> has to be 6, otherwise button is too big I'm no friend of automated translations - so I don't use i18n |
Your TOO fast :-) I18n is a warning only which will not be considered blocking. |
:) - so all this 5 times 12 for dividers could be removed?.... -> next release ;) ... so must be fixed label isn't relevant anymore? Or do I have to change something? |
Sorry, but due to travel / absence I will not able to do the review before ioBroker Meeting Solingen next weekend. reminder 4.11.2024 |
thats defintstly wrong ! |
REVIEW - WORK IN PROGRESS
|
@hombach
setObject(Async) creates a new object whenever it is called. You should avoid using setObject unless you really want to create new objects. Creating a new object deletes any userConfig, i.e. configures history logging which is most likely not desired. Most likely either setObjectNotExists oder (even better in most cases) extendObject should be used. Extend Object ensures that attributes like role, read/write flag etc. are set as specified and hence extendObjet should be preferred when called once during startup of the adapter. You are using setObject i.e. here: Wouldn't it be sufficient to use extendObject? setObject will delete the old object and hence delete all user defined attribute, i.e. setting for history adapter.
Only the values specified here (https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/stateroles.md) may be used as state roles. Do not invent new names as this might disturb the functionality of other adapters or vis. In addition the roles MUST match the read/write functionality. As an example a role value.* requires that the state is a readable state. Input states (write only) should have roles like level.*. Please read the description carefully. States with role 'button' should (must) have attribute 'common.read=false' set. A button ( "Taster" in german only triggers when you press but else has no state), so it should also be not readable. This is also like HomeMatic does it. A switch has clear states true or false and so can be read. Please avoid using general roles (state, value) whenever a dedicated role exists. role 'value' must not be writeable. role 'indicator' must not be writeable.
The adapter package provides wrapper routines for native setTimeout, setInterval, clearTimeout and clearInterval. Using those routines ensures that timers are cancelled on on load. Additional checks on thomse limits might be performed, too. So consider replacing native setTimeout/clearTimeout by adapter.setTimeout/adapter.clearTimeout or this.setTimeout/this.clearTimeout. The same refers to setInterval/clearInterval. You're using setInterval here check and limit intervals used to access cloud services
reminder 16.12.2024 |
-> avoid usage of setObject This is only used for adapter setup.... you have to read the total code - automatic scanning for key words dosn't work this time.... projectUtils.ts is a helper class I'm using in most adapters -> reevaluate state roles same, projectUtils.ts is a helper class I'm using in most adapters. The fact it's able to set up writable states doesn't tell it's used in the adapter. IUpo to now, all states are read only, as they are just states polled from the car. They have special background for the car but most of them no dedicated type in ioBroker. So I would prefer generall roles. -> consider using adapter.setTimeout / this.setTimeout instead of (standard) setTimeout changed in 0.4.3 -> Limit all intervals used to access cloud services allready done .... jsonConfiig.json: added extra verification in code |
DONE |
-> avoid usage of setObject Well extendObject would be the better solution anyway in my oppinion. But finally it's your decision as using setObject is strongly discouraged but not forbidden. So its non blocking. -> reevaluate state roles |
Hi Martin, adding the role as optional parameter in case of setting up writeable states is a good idea... implemented in 0.4.4. |
added a few more precise state roles in 0.4.5 |
@hombach Please create a thread at https://forum.iobroker.net/category/91/tester titled like "Test Adapter " to collect some user feedback and provide a link to this topic when requesting addition to stable repository later. Note: If an other testing topic already exists, it' OK to continue using this topic too. |
Hi Martin, kann gerne was posten - darf man aber ja in der Catagory nicht. |
Als dev darfst du es. |
No description provided.