Skip to content

Commit

Permalink
Remove dummy sensors
Browse files Browse the repository at this point in the history
Removed as this was used for an attempt to get it working for Apexharts, which failed
  • Loading branch information
vingerha committed Oct 5, 2024
1 parent 9e7acd8 commit eb820b6
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions app/gazpar2mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,22 +650,7 @@ def run(myParams):

## Other
logging.debug("Creation of other entities")
myEntity = hass.Entity(myDevice,hass.BINARY,'connectivity','connectivity',hass.CONNECTIVITY_TYPE,None,None).setValue('ON')

if myParams.hassLts:
logging.debug("Creation of dummy LTS sensors")
myEntity = hass.Entity(myDevice, hass.SENSOR, 'consumption_stat', 'consumption stat', hass.GAS_TYPE, None,
'm³').setValue('0')
myEntity = hass.Entity(myDevice, hass.SENSOR, 'consumption_kwh_stat', 'consumption kwh stat', hass.ENERGY_TYPE, None,
'kWh').setValue('0')
myEntity = hass.Entity(myDevice, hass.SENSOR, 'consumption_pub_stat', 'consumption pub stat', hass.GAS_TYPE, None,
'm³').setValue('0')
myEntity = hass.Entity(myDevice, hass.SENSOR, 'consumption_kwh_pub_stat', 'consumption kwh pub stat', hass.ENERGY_TYPE, None,
'kWh').setValue('0')
myEntity = hass.Entity(myDevice, hass.SENSOR, 'consumption_cost_stat', 'consumption cost stat', hass.COST_TYPE, None,
'EUR').setValue('0')
myEntity = hass.Entity(myDevice, hass.SENSOR, 'consumption_cost_pub_stat', 'consumption cost pub stat', hass.COST_TYPE, None,
'EUR').setValue('0')
myEntity = hass.Entity(myDevice,hass.BINARY,'connectivity','connectivity',hass.CONNECTIVITY_TYPE,None,None).setValue('ON')

# Publish config, state (when value not none), attributes (when not none)
logging.info("Publishing devices...")
Expand Down

0 comments on commit eb820b6

Please sign in to comment.