Hi @philwilldo, I have got the token file working, HA has written an access token to it. That was just my lack of understanding that HA would create the token.
Am I right in my thinking that I need to (for now, until the code is merged) put the pyfujitseu/ folder at /config/deps/lib/python3.7/site-packages/pyfujitseu/? Without it I get the following error:
Error while setting up platform fujitsu_general_heatpump
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 149, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 68, in setup_platform
import pyfujitseu.api as fgapi
ModuleNotFoundError: No module named 'pyfujitseu'
with it there I get:
Error while setting up platform fujitsu_general_heatpump
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 149, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 84, in setup_platform
add_entities(FujitsuClimate(fglairapi, dsn) for dsn in devices)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 198, in _schedule_add_entities
list(new_entities),
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 84, in <genexpr>
add_entities(FujitsuClimate(fglairapi, dsn) for dsn in devices)
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 106, in __init__
self._swing_mode = self.swing_mode
File "/config/custom_components/fujitsu_general_heatpump/climate.py", line 195, in swing_mode
return self._fujitsu_device.get_swing_mode_desc()
File "/config/deps/lib/python3.7/site-packages/pyfujitseu/splitAC.py", line 141, in get_swing_mode_desc
return SWING_LIST_DICT[self.af_vertical_direction['value']]
TypeError: 'NoneType' object is not subscriptable
I coul;d be doing completely the wrong thing there, just following my nose.