adapt interface of ha_confs
This commit is contained in:
@@ -159,7 +159,7 @@ class Infos:
|
|||||||
return not value <= dep['less_eq']
|
return not value <= dep['less_eq']
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def ha_confs(self, ha_prfx, inv_node_id, inv_snr, proxy_node_id, proxy_unique_id, sug_area =''):
|
def ha_confs(self, ha_prfx, node_id, snr, singleton:bool, sug_area =''):
|
||||||
'''Generator function yields a json register struct for home-assistant auto configuration and a unique entity string
|
'''Generator function yields a json register struct for home-assistant auto configuration and a unique entity string
|
||||||
|
|
||||||
arguments:
|
arguments:
|
||||||
@@ -169,12 +169,11 @@ class Infos:
|
|||||||
tab = self.__info_defs
|
tab = self.__info_defs
|
||||||
for key in tab:
|
for key in tab:
|
||||||
row = tab[key]
|
row = tab[key]
|
||||||
if 'singleton' in row and row['singleton']:
|
if 'singleton' in row:
|
||||||
node_id = proxy_node_id
|
if singleton != row['singleton']:
|
||||||
snr = proxy_unique_id
|
continue
|
||||||
else:
|
elif singleton:
|
||||||
node_id = inv_node_id
|
continue
|
||||||
snr = inv_snr
|
|
||||||
prfx = ha_prfx + node_id
|
prfx = ha_prfx + node_id
|
||||||
|
|
||||||
#check if we have details for home assistant
|
#check if we have details for home assistant
|
||||||
|
|||||||
Reference in New Issue
Block a user