bhyve-home-assistant: Switch appears to be on all the time and cannot be switched off

Describe the bug After the most recent BHYVE upgrade I still have a switch in HA but in the UI it now is always on. If I toggle the switch to off, it moves back to on again after a few moments. On the BHYVE timer, the switch is actually off all the time. I have included the log further down this report and at the end I tried to turn the switch off and on, but nothing seems to be shown in the log.

Expected behaviour The switch in the UI should represent the status of the switch

BHyve devices I have a BHYVE gateway and a single tap timer

Logs

2021-12-18 18:31:58 DEBUG (MainThread) [custom_components.irrigation_unlimited] START
2021-12-18 18:31:59 DEBUG (MainThread) [custom_components.bhyve.pybhyve.client] Logged in
2021-12-18 18:31:59 DEBUG (MainThread) [custom_components.irrigation_unlimited] REGISTER [2021-12-18 18:31:00] controller: 1, zone: 0, entity: binary_sensor.irrigation_unlimited_c1_m
2021-12-18 18:31:59 DEBUG (MainThread) [custom_components.irrigation_unlimited] CALL [2021-12-18 18:31:00] service: enable, controller: 1, zone: 0, data: null
2021-12-18 18:32:00 DEBUG (MainThread) [custom_components.bhyve] Devices: [{"last_connected_at": "2021-12-15T16:04:12.581Z", "address": "REDACTED", "timezone": {"dst_offset": 3600, "raw_offset": 43200, "timezone_id": "Pacific/Auckland", "timezone_name": "New Zealand Daylight Time"}, "full_location": "REDACTED", "firmware_version": "0030", "name": "B-hyve1", "type": "bridge", "updated_at": "2021-12-15T16:04:12.581Z", "reference": "446755212ddf", "mac_address": "446755212ddf", "mesh_id": "5fffdce14f0cd37b7964ff3e", "status": {"next_start_programs": [], "next_start_time": "1970-01-01T00:00:00+13:00", "watering_status": null}, "wifi_version": 0, "id": "5fffdce14f0cd37b7964ff3c", "num_stations": 0, "user_id": "5fffd1d64f0c33b47f58fa39", "device_gateway_topic": "devices-7", "hardware_version": "BH1-0001", "is_connected": true, "location": "REDACTED", "created_at": "2021-01-14T05:55:45.400Z"}, {"last_connected_at": "2021-12-16T20:01:58.821Z", "address": "REDACTED", "water_sense_mode": "off", "scheduled_modes": {"auto": {"at": "", "annually": false}, "off": {"at": "", "annually": false}}, "timezone": {"dst_offset": 3600, "raw_offset": 43200, "timezone_id": "Pacific/Auckland", "timezone_name": "New Zealand Daylight Time"}, "full_location": "REDACTED", "weather_forecast_location_id": "5e2bfaea4f0c0b73fd19e1bd", "firmware_version": "0041", "name": "Smart Hose Timer 1", "type": "sprinkler_timer", "manual_preset_runtime_sec": 120, "battery": {"percent": 43, "charging": false}, "restricted_frequency": null, "weather_delay_thresholds": {"precip_prob": 30, "precip_in": 0.125, "wind_speed_mph": 20, "freeze_temp_f": 37}, "updated_at": "2021-12-18T04:32:00.972Z", "reference": "446755212ddf-53470", "mac_address": "446755126458", "weather_station_id": null, "mesh_id": "5fffdce14f0cd37b7964ff3e", "status": {"run_mode": "manual", "next_start_programs": ["b"], "rain_sensors": [], "rain_delay_overridden_at": "2021-10-24T01:01:19.252Z", "watering_status": {"program": null, "current_station": 1, "started_watering_station_at": "2021-12-16T19:00:34.000Z", "stations": [{"run_time": 2.0, "station": 1}], "rain_sensor_hold": false}, "rain_delay_suggested_at": "2021-12-12T19:01:04.235Z", "rain_delay": 0, "flow_sensor": null, "next_start_time": "2021-10-24T14:00:00+13:00", "rain_delay_started_at": "2021-12-16T18:01:29.000Z"}, "id": "5fffde5f4f0c33b47f58fa9a", "num_stations": 1, "notes": "", "zones": [{"station": 1, "slope_grade": 0, "sun_shade": "mostly_sunny", "name": "Veggies", "landscape_type": "warm_season_turf", "num_sprinklers": 1, "soil_type": "loam", "catch_cup_volumes": [], "catch_cup_run_time": 0, "smart_watering_enabled": false, "sprinkler_type": "drip"}], "user_id": "5fffd1d64f0c33b47f58fa39", "google_home_status": null, "device_gateway_topic": "devices-7", "hardware_version": "HT25-0000", "is_connected": true, "location": "REDACTED", "created_at": "2021-01-14T06:02:07.314Z", "suggested_start_time": "06:00", "et_id": "5644ff77ad27a7777fff765e"}]
2021-12-18 18:32:00 DEBUG (MainThread) [custom_components.bhyve] Programs: [{"pending_timer_ack": true, "name": "Veggies", "program_start_date": "2021-08-06T01:11:12.016Z", "frequency": {"type": "days", "days": [0, 1, 2, 3, 4, 5, 6]}, "program_end_date": null, "is_basic_program": false, "group_id": "609cadeb4f0cc23b2fbd22bc", "updated_at": "2021-08-06T01:11:33.032Z", "updated_via": "wifi", "start_times": ["06:00", "18:00"], "id": "5fffed124f0cd37b7964ffdb", "budget": 100, "group_run_times": [], "device_id": "5fffde5f4f0c33b47f58fa9a", "program": "a", "run_times": [{"run_time": 15, "station": 1}], "enabled": false, "created_at": "2021-01-14T07:04:50.016Z"}, {"pending_timer_ack": true, "name": "Watering Can", "program_start_date": "2021-10-24T00:32:55.927Z", "frequency": {"type": "days", "days": [0, 1, 2, 3, 4, 5, 6]}, "program_end_date": null, "is_basic_program": false, "group_id": "6174a9bf4f0cf51668ed527c", "updated_at": "2021-10-24T00:33:03.923Z", "updated_via": "wifi", "start_times": ["14:00"], "id": "609cae994f0cc5e78a2d29ce", "budget": 170, "group_run_times": [], "device_id": "5fffde5f4f0c33b47f58fa9a", "program": "b", "run_times": [{"run_time": 30, "station": 1}], "enabled": false, "created_at": "2021-05-13T04:44:09.597Z"}]
2021-12-18 18:32:00 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Smart Hose Timer 1 rain delay
2021-12-18 18:32:00 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Veggies zone
2021-12-18 18:32:00 INFO (MainThread) [custom_components.bhyve.switch] Veggies zone watering_status: {'program': None, 'current_station': 1, 'started_watering_station_at': '2021-12-16T19:00:34.000Z', 'stations': [{'run_time': 2.0, 'station': 1}], 'rain_sensor_hold': False}
2021-12-18 18:32:00 INFO (MainThread) [custom_components.bhyve.switch] Veggies Zone: Watering program Veggies (a) is not enabled, skipping
2021-12-18 18:32:00 INFO (MainThread) [custom_components.bhyve.switch] Veggies Zone: Watering program Watering Can (b) is not enabled, skipping
2021-12-18 18:32:00 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Program Veggies
2021-12-18 18:32:00 INFO (MainThread) [custom_components.bhyve.switch] Creating switch: Program Watering Can
2021-12-18 18:32:01 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Authenticating websocket
2021-12-18 18:32:01 INFO (MainThread) [custom_components.bhyve.pybhyve.websocket] Websocket connected
2021-12-18 18:32:25 INFO (MainThread) [custom_components.bhyve.sensor] Creating state sensor: Smart Hose Timer 1 state
2021-12-18 18:32:25 DEBUG (MainThread) [custom_components.bhyve.sensor] State sensor Smart Hose Timer 1 state setup: State: manual | Available: True
2021-12-18 18:32:25 INFO (MainThread) [custom_components.bhyve.sensor] Creating history sensor: Veggies zone history
2021-12-18 18:32:25 INFO (MainThread) [custom_components.bhyve.sensor] Creating battery sensor: Smart Hose Timer 1 battery level
2021-12-18 18:32:25 INFO (MainThread) [custom_components.bhyve.sensor] Creating state sensor: Smart Hose Timer 1 state
2021-12-18 18:32:25 DEBUG (MainThread) [custom_components.bhyve.sensor] State sensor Smart Hose Timer 1 state setup: State: manual | Available: True
2021-12-18 18:32:25 INFO (MainThread) [custom_components.bhyve.sensor] Creating history sensor: Veggies zone history
2021-12-18 18:32:25 INFO (MainThread) [custom_components.bhyve.sensor] Creating battery sensor: Smart Hose Timer 1 battery level
2021-12-18 18:32:27 ERROR (MainThread) [homeassistant.components.sensor] Platform bhyve does not generate unique IDs. ID 446755126458:5fffde5f4f0c33b47f58fa9a:state already exists - ignoring sensor.smart_hose_timer_1_state
2021-12-18 18:32:27 ERROR (MainThread) [homeassistant.components.sensor] Platform bhyve does not generate unique IDs. ID 446755126458:5fffde5f4f0c33b47f58fa9a:battery already exists - ignoring sensor.smart_hose_timer_1_battery_level
2021-12-18 18:32:29 ERROR (MainThread) [homeassistant.components.sensor] Platform bhyve does not generate unique IDs. ID 446755126458:5fffde5f4f0c33b47f58fa9a:1:history already exists - ignoring sensor.veggies_zone_history

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 33 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Doh, Doh Doh!!! Yep I must have done a copy paste in the past. All sorted out - many thanks for the assist.