fustom / python-ariston-api

MIT License
11 stars 9 forks source link

Issue on use API ariston #137

Closed robertomontinaro80 closed 7 months ago

robertomontinaro80 commented 7 months ago

Hi @fustom I'm trying to use the Ariston api in order to debug my chaffoteaux thermo but with no success. I've tried to follow the example in readme but when I try to call API to get preset modes I always receive None. I can say hello and get device info with discover call. Could you explain me what is wrong with my steps? Thanks in advance.

fustom commented 7 months ago

First you need to get device features/data/energy data depends on what you need. https://github.com/fustom/python-ariston-api?tab=readme-ov-file#use-your-device

This method is called: "Cloud Polling" https://www.home-assistant.io/blog/2016/02/12/classifying-the-internet-of-things/#classifiers

robertomontinaro80 commented 7 months ago

First you need to get device features/data/energy data depends on what you need. https://github.com/fustom/python-ariston-api?tab=readme-ov-file#use-your-device

This method is called: "Cloud Polling" https://www.home-assistant.io/blog/2016/02/12/classifying-the-internet-of-things/#classifiers

Thanks @fustom for your answer. My objective is to retrieve the preset modes of my thermo. So I have to make those calls before to retrieve the preset modes with the call device.plant_mode_opt_texts()?

fustom commented 7 months ago

As may you can see plant_mode_opt_texts() calls _get_item_by_id who works with data. So you have to populate the data dictionary with update_state() or async_update_state()

robertomontinaro80 commented 7 months ago

As may you can see plant_mode_opt_texts() calls _get_item_by_id who works with data. So you have to populate the data dictionary with update_state() or async_update_state()

Really thank you @fustom for your kindly reply